简单修改文件名python脚本

import os
import sys

path = "D:\emojis"

for (path,dirs,files) in os.walk(path):
    for filename in files:
        newname = "emoji_"+filename
        os.rename(path+"\\"+filename , "D:\new_emojis"+"\\"+newname)

  

你可能感兴趣的:(python)