Is it possible to force a rename os.rename to overwrite another file if it already exists? For example in the code below if the file Tests.csv already exists it would be re
Funny enough, the documentation for os.rename() says it does replace the target on Unix systems, but on Windows it does not. They mention something vague about it being impossible to implement atomic renaming if the destination exists on Windows, which IMO is hardly enough reason not to support it.
You should catch OSError (destination exists on Windows) and remove the destination and try again, I suppose.