mnmv ("Match and move") is a small bash script which moves files by performing a search and replace on their filenames. For example, you might want to change the extension of some files, move files into directories classified by extension or move a bunch of MP3s into directories organised by album and artist name.

The text matched is a regular expression, and the substitution text can contain back references. This allows quite complex replacements to be done.

There is not much documentation, but I've put a few handy examples online that will get you going. If you are familiar with sed or Perl you should have few problems working it out, as mnmv basically does a s/match/replace/ on the filename.

Use the pretend flag -p to see what mnmv will do without moving any files. mnmv will happily overwrite existing files without warning. Be especially careful not to write a regexp that maps several of your files to one filename.

Valid HTML 4.01! Valid CSS!

Contact Jim