I'm trying to batch rename PDF files to remove all characters from right to left until a numeric character is reached on Mac OS.
For example:
10002ASmith.pdf > 10002.pdf
1023AJones.pdf > 1023.pdf
The numeric length in the beginning of the files is variable so I figure would be best to have regex rename from right to left until a number is reached.
I know Mac Yosemite comes with batch rename capabilities but didn't see a regex rename option. Is it easy to do this in terminal and if so how, or is there a free program I can use to use a regular expression?
I suppose I just need to know what the actual regular expression would be since I'm far from experienced in regex.
Thank you for help in advance!
Jon
NameChanger sounds like a good fit for this purpose - it's free, and will preview the proposed batch regex rename before applying it.
In the example below, I've used the regex ^(\d+).*, and replaced with $1.pdf.

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With