Home | Mirror | Search

6. rename

批量更改副檔名

rename 's/\.png/\.PNG/' *.png

rename '/\.mp3/\.MP3/' *.mp3
rename .mp3 .MP3 *.mp3

rename GIF gif *.GIF
		
for file in *.GIF 
do 
        mv $file ${file%.*}.gif 
done		
		
$ mkdir chapter.command.xxx.xml
$ mkdir chapter.command.bbb.xml
$ mkdir chapter.command.ccc.xml
$ mkdir chapter.command.ddd.xml

$ rename 's/command/cmd/' *.command.*.xml		
		
comments powered by Disqus