I am trying to figure out the best way to move one file from a specified folder into another specified folder using python. I managed to find two different ways to do that.
os.rename("path/to/current/filename.txt","path/to/new/desination/for/filename.txt")
shutil.move("path/to/current/filename.txt", "path/to/new/destination/for/file.txt")
Which method is better to use in order to move the file to the destination folder and delete any duplication files that might occur there? Thanks.