import os
path="S:\S1031SS\BBiizhi"
f = os.listdir(path)
# print(len(f))
# print(f[0])
n = 0
i = 0
for i in f:
# 设置旧文件名(就是路径+文件名)
oldname1 = f[n]
newname1 = '完'+str(n+1) + '.jpg'
#前后缀随便加,随便都OK
oldpath = os.path.join(path, i)
newpath = os.path.join(path, newname1)
os.rename(oldpath, newpath )
print(oldname1, '======>', newname1)
n += 1