Noob - How To Rename Batch of files in a specific manner

Hi, I've searched through renaming and it's all rather complicated normally requiring user input etc. Could anyone point me in the right direction for doing the following:

I have audio files that are named with a _01 to _13 at the end of each name
This relates to the chromatic scale in music (they are sample) so
So - _01 should be _C
_02 should be _C#
_03 should be _D
etc etc

Can anyone help me please?

Kind regards

There are two solutions that enable batch renaming of selected Finder files:

  • Batch Rename Files in the Finder, which you can also find in your Keyboard Maestro Macro Library

  • Either of the two revisions of that macro at the end of Rename Files Mystery (although the Perl version has worked better than the JavaScript version for me). These enable regular expressions (which you don't need in this case).

Do something like:

This assumes _01 etc do not appear anywhere else in the path of the file (including parent folders).

Make sure you have a full Mac backup, and a backup of the specific folder, before testing such a macro.

Hi @Skipstream, you might want to take a look at this discussion Deleting from a file name where I very recently posted a macro that is virtually the same as outlined in @peternlewis' steps above.

You would need to edit the search and replace regex strings in my macro as per Peter's instructions but that shouldn't be too hard for you to try.

Good luck!

1 Like