Hello All experts…good day…please help fix my code. I have list of files in a folder. All are *.docx. I want o rename all in sequence like example i have 5 files. I want to rename it to P001 to P005. Hoping for your support.
_ext = ".docx"
numnum = 1
for i,filename in enumerate(os.listdir(destination_folder)):
os.rename(filename, "P00" + str(numnum) + _ext)