Avatar image for captain_felafel
#1 Edited by Captain_Felafel (1727 posts) -

I have a problem and the only cure is more scripting experience!

I need to change a large number of files' (roughly 1000) names. I need to keep intact the names they already have, only changing the numeric value that is part of their file name. Here is an example of what I am talking about:

AB 001 CD.file

AB 002 EF.file

AB 003 GH.file

What I need to do is change the numeric value of these files without affecting the third portion of the file name (CD, EF, GH, et al). From the example above to this:

AB 100 CD.file

AB 101 EF.file

AB 102 GH.file

This has proven to be very tricky, as I have found no script nor program capable of doing such a thing. If anyone with scripting experience on the Mac could help with this, I would be most appreciative.

Avatar image for drintrovert
#2 Edited by DrIntrovert (86 posts) -

"Mac scripting" is just Bash Unix scripting. I'm too lazy to Google this for you, but I'm sure you can find a Bash script that will do what you want. (you need to use loops).