This formula is based off the Perl script of the same name. Refer to that original version’s documentation if you get stuck.
Forgive the brevity below. I’ll update this once I get more of a hang of Rename.
You can install rename with Homebrew:
brew install rename
Batch rename files
--counter-format Here’s how to set to zero-padded to three digits:
rename --counter-format 001 *.jpg
rename --counter-format 000001 --lower-case --keep-extension --expr='$_ = "$N" if @EXT' *
(Right now the above is problematic as it reads
--just-print) will just show the changes in Terminal without applying them to the actual files.
rename -n # rest of command to preview
I use it almost every time I use rename; first running the desired command with
-n (and usually fixing one or two things) and then, when I’m happy, running the real thing without