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
How about use of replace() and shutil.move() ? example:
import os from shutil import move filename=r'C:\Users\Test.txt' move(filename,filename.replace('.txt','.csv')
also you can make it more general for all the files. Thanks