|Sven Guckes ©2002-2003||
Latest change: Tue May 08 17:47:47 CEST 2018
"mmv" is a small and yet powerful tool. it solves a whole lot of problems which are possible with other tools, too, but not as easy as with mmv.
adding a prefix/suffix to names: mmv '*' 'prefix#1' mmv '*' '#1suffix' note: the "#1" refers to the match by the pattern '*'. add a date string as prefix: mmv '*' '2003-11-03.#1' add a common filename extension as suffix: mmv '*' '#1.jpg'
removing prefix/suffix: mmv 'foo-*' '#1' mmv '*.txt' '#1' this basically keeps only the part which matches the '*' wildcard and thereby loses the rest of the name.
mmv '*.bar' '#1.foo'the extension ".bar" is lost and the extension ".foo" is added.
mmv '* *' '#1_#2'
Note: This pattern matches the *first* space in the filename *only*. Therefore only the first match gets changed. Apply this command several times to replace all the spaces in the local filenames one by one.
mmv "*" "#l1"make filenames uppercase (#u):
mmv "*" "#u1"
"mmv" was written by Vladimir Lanin and posted to comp.sources.unix in April 1990 (Volume 21, issues 87 and 88). I haven't seen any patches with improvements so maybe it is just a perfect tool. :-)
http://www.prnet.de/RegEx/ 1999-04-27: "I'm currently working on a "mmv" (Multiple Move) Command for the Mac That will allow renames based on RegEx patterns. If you're interested, drop me a note: Anjo Krank ak(at)prnet.de" seems the URL is dead. pity. but here's one that works: http://download.com.com/3000-2207-907266.html the file is only 53KB.