python批量重命名
import os
path = '/home/zqf/bridge/bdata/images/train'
original_name = os.listdir(path)
print(original_name)
for i in original_name:
filename=os.path.join(path,i)
savename = os.path.splitext(filename)[0]
savename=savename+".jpg"
print(savename)
os.rename(filename,savename)
print("OK")