import os
filepath = "C:\\Users\\Administrator\\Videos\\Captures\\"
filelist = os.listdir(filepath)
n = 1
for file in filelist:
m = '%04d' % n
oldname = filepath + file
newname = filepath + str(m) + '.png'
os.rename(oldname,newname)
print(oldname,'----------',newname)
n+=1