我在一个文件夹中有很多 bmp 文件,我想重命名它,有点像
abc.bmp bcd.bmp cde.bmp
至
abc_hello.bmp bcd_hello.bmp cde_hello.bmp
使用重命名命令,我无法做到,任何帮助都会很棒。
You can say:
rename 's/(\.bmp$)/_hello$1/' *.bmp
in order to rename the files.
如果rename
引用包中的prename
命令perl
然后重命名xxx.bmp
为xxx_hello.bmp
,运行:
rename 's/.*\K(?=\.bmp$)/_hello/' *.bmp
这对我的测试有用:
rename .bmp _hello.bmp *.bmp