Mac OS-用rename命令批量修改文件名

时间:2021-02-05 10:29:22   收藏:0   阅读:0

     没啥好说的。直接上步骤吧。Mac上没有自带rename命令,所以得先安装rename命令

1、brew install rename

2、批量修改文件名,语法格式: rename ‘s/stringx/stringy/‘ files

把 *.txt 文件中的 `你有啥` 全部改成 `我有啥` 

demo:   rename ‘s/你有啥/我有啥/‘ *.txt 

3、如果遇到特殊字符要注意使用 \ 反斜杠 比如:

rename ‘s/\(/我有啥/‘ *.txt

 

参考:

【1】https://www.jb51.net/article/111961.htm

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!