python3 更改文件后缀名
#!/usr/bin/python3
import os, sys
str = os.listdir("c:\\11")
print(str)
for i in str:
i="c:\\11\\"+i
newstr = ''.join(i)
newstr = newstr + ".jpg"
print(newstr)
os.rename(i,newstr)
#!/usr/bin/python3
import os, sys
str = os.listdir("c:\\11")
print(str)
for i in str:
i="c:\\11\\"+i
newstr = ''.join(i)
newstr = newstr + ".jpg"
print(newstr)
os.rename(i,newstr)