Feb-02-2020, 12:42 PM
Hi all,
i am just learning about the modul shutil and tried to move a file to a destination folder.
It works. However if i try to run the script again and overwrite the file, it doesnt work, because the file exists alreay in the destination.
i am just learning about the modul shutil and tried to move a file to a destination folder.
It works. However if i try to run the script again and overwrite the file, it doesnt work, because the file exists alreay in the destination.
shutil.move(r'C:\Users\user\Desktop\Source\t.txt', r'C:\Users\user\Desktop\Destination')is there a way to overwrite the file if it exits ?