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

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

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

更新一个Python版本:

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

效果:

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