python 文件批量改名重命名 rename
path = '/Volumes/Seagate/dev/imgs/'
os.chdir(path)
print('cwd: ', os.getcwd())
for f in os.listdir('.'):
if not f.endswith('.jpg'):
os.rename(f, f + '.jpg')
+V why_null 请备注:from博客园
path = '/Volumes/Seagate/dev/imgs/'
os.chdir(path)
print('cwd: ', os.getcwd())
for f in os.listdir('.'):
if not f.endswith('.jpg'):
os.rename(f, f + '.jpg')
+V atob('d2h5X251bGw=')
请备注:from博客园