import os #导入模块
# D:\Desktop\PJ\python\articAL\chinese_license_plate_generator-master\output
filename = 'D:\\Desktop\\PJ\\python\\articAL\\chinese_license_plate_generator-master\\output' #文件地址
list_path = os.listdir(filename) #读取文件夹里面的名字
count = 1
for index in list_path:
path = filename + '\\' + index # 原本文件名
new_path = filename + '\\' + f'{count}' + '.jpg'
print(new_path)
os.rename(path, new_path)
count += 1
print('修改完成')
话不多说直接开整