批量重命名 2022.7.30 2025.9.30 代码 38 1 分钟1 2 3 4 5 6 7 8 9 from os import system, popen originPostFix = 'js' toPostFix = 'ts' ans = popen(f'find . -name "*.{originPostFix}" ') for i in ans.read().split('\n'): if not i: continue system(f'mv {i} {i.replace(originPostFix, toPostFix)}') 作者:Karrrrr链接:https://blog.single-one.top/posts/coding/rename/