Hacker News new | ask | show | jobs
by aembleton 3206 days ago
MMV is the latest interesting one I've found recently: https://ss64.com/bash/mmv.html

For example, I can do the following:

   mmv "flight.*" "flight-new.#1"
and this will rename all of my files that start with flight. to flight-new. preserving the file extension. So useful, when you've got a bunch of different files with the same name but with different extensions such as html, txt and sms.
2 comments

Check out qmv from renameutils.[1] Using it you can use your $EDITOR to batch-rename files. It does sanity checking like making sure you don't rename two files to the same name and lets you fix such mistakes before trying again.

[1] - http://www.nongnu.org/renameutils/

I use this `rename` (available from Homebrew as `rename`): http://plasmasturm.org/code/rename/