by jsrn · 17y ago · 0 comments
mmv "*.mp3" "old_#1.mp3"
prefixes all files in the current directory ending with .mp3 with 'old_'. Btw., the quotes around the arguments are necesssary because mmv uses some of the same metacharacters as the shell does.Multiple substitutions are allowed, e.g.:
$ mmv "*.*" "#1___#2"
renames blub.xyz to blub___xyz.zmv '(??)-(*).mp3' '$1 - ${(C)2:gs/_/ }.mp3'
Which would change "01-foo_bar_baz.mp3" into "01 - Foo Bar Baz.mp3"
qmv, qcp - Rename or copy files quickly, editing the file names in a text editor
Found nothing better for bulk renames because you get to use all the pattern/replace power of your favorite editor instead of learning some wierd specialized grammar through trial & error.
This is how to remove all spaces from mp3 filenames using vim:
qmv -f do *.mp3
:%s/ /_/g
:wq
http://www.joel.lopes-da-silva.com/articles/computer-science...
(including man pages etc.) Caveat: I didn't try it myself (I don't have Leopard).