Is there any built in functionality in python as to rename files smartly in windows.
I am using os.rename to move files to a higher directory.
The problem is, the directory I move the file to could have a file that has the same name. I want to do what windows allows a user to do in the GUI, which is choose to auto-rename the file to "<file>.<ext>(n)" where n is the smallest integer not used already.
Is there any way to do this built in. If not does anyone have code that does this?
Thanks