How to avoid “WindowsError: [Error 5] Access is denied”
See RemoveDirectory documentation; “The RemoveDirectory function marks a directory for deletion on close. Therefore, the directory is not removed until the last handle to the directory is closed.” This means that if something manages to create a handle to the directory you remove (between creation and removal) then the directory isn’t actually removed and you … Read more