#coding=utf-8 import os path = '/opt/fish/' count = 1 for file in os.listdir(path): os.rename(os.path.join(path,file),os.path.join(path,str(count)+".jpg")) count+=1
#coding=utf-8 import os path = '/opt/fish/' count = 1 for file in os.listdir(path): os.rename(os.path.join(path,file),os.path.join(path,str(count)+".jpg")) count+=1