1 min read
I want to rename all files in the folder to sequential names of files e.g 0000,0001,0002…
Vishal Sharma Answered question June 25, 2019
1 min read
This simple code in python had solved my problem of renaming the file in the folder in the sequential manner.
Try it Out…
import os path = r'C:\Users\Vishal Sharma\Desktop\scrapped image\2d bunglaow floor plan'#enter your path files = os.listdir(path) os.getcwd() for index, file in enumerate(files): os.rename(os.path.join(path, file), os.path.join(path, str(index)+'000'+'.jpg'))
FreshlyBuilt Edited answer March 6, 2020