Rename Multiple File
import os
Folderpath='E:/Old Laptop/Notice/Art Class/Images'
def rename(Folderpath,NewName,Number,Extension):
list=os.listdir(Folderpath)
os.chdir(Folderpath)
Number=0
for i in list:
os.rename(i,NewName+str(Number)+'.'+Extension)
Number=Number+1
rename(Folderpath,'Image ',1,'jpg')
print("File Renamed Successfully!")
If you have any doubts, feel free to post it in comment Section.
Comments