Batch Renaming Files

Hi all,

I need some help figuring out how to batch rename files in Finder. My goal is to take several files that have different name elements and reorder them to the same format. I'm not sure how possible all of these steps are, but I wanted some advice on where to start.

Here is what I am trying to do:

(ShowCode)-(Picture Version)-(Cue Number)-(Cue Name)-(Track Name)-(Time Code)

Example of what this needs to look like in its finished state

ABC103-LC092624-1m01-Hello There-FullMix-01.34.47.10

The problem is some of the files are named like this:

ABC103-LC0926-0m00-Fullmix-Recap-01.00.05.00

As you can see, all of the information is there, just some of it is in the wrong order. My hopes for the macro are this.

  1. Once all of the tracks to be renamed are selected, a prompt user menu will appear asking for certain info that remains the same for all files.

Showcode:

Picture Version:

Track Name:

One this information is inputted, hopefully it'd find and replace those elements, but keep the elements such as the cue number, cue name, and timecode while also ordering them correctly. Is this something that is possible? I have been trying to learn about using regualr expressions but I am very novice with the software. Any help would be appreciated!

Thanks

Take a look at Rename Files Mystery for my Perl solution, which I still use to do this sort of thing.

1 Like

What you need to do is post an example of the "bad" format, and then that same file in the "good" format.

If your "bad" name is

ABC103-LC0926-0m00-Fullmix-Recap-01.00.05.00

...should your "good" name be

ABC103-LC0926-0m00-Recap-Fullmix-01.00.05.00

...or something else?

You don't need regex for this. The "items" in the string are separated by -. "Show code would be item 1 of the array and you could get it with %Variable%Local_theString[1]-%.

Take a look at the "Variable Arrays" and the following "Custom Delimiter" sections of "Using Variables" in the manual. Have a go and see how you get on.

Thank you both for the reply! I’ll give variable arrays a try.

So the “bad” format would be

ABC103-LC0926-0m00-Fullmix-Recap-01.00.05.00

The good format would be

ABC103-LC092624-0m00-Recap-FullMix-01.00.05.00

Hope that helps with giving me guidance on this, thanks.