[Python]批量重命名,修改文件名中的部分字符串

上一版PowerShell版本的莫名其妙的有些改不了:https://www.cnblogs.com/alfredsun/p/10124230.html

 

 

 

更新一个Python版本:

import os
files = os.listdir(os.getcwd())
for file in files:
    os.rename(file,file.replace('FLAC','FLACx2'))

 

效果:

 

posted @ 2020-01-10 22:21  夜歌乘年少  阅读(1895)  评论(0编辑  收藏  举报