Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

robertcoogan

macrumors 6502a
Original poster
Apr 5, 2008
842
1,252
Joshua Tree, California
I need to rename files sequentially in a series of folders. So each group of files within each individual folder should read...

[folder a]
FILE_01
FILE_02
FILE_03

...and so on. Automator does a great job as long as I add the contents of each folder one at a time. I would like to add all of the pages at once (or at least in folder batches of 20), then using Automator rename each file, while keeping the numbering for each folder unique to that folder. So I want to see this:

[folder a]
FILE_01
FILE_02
FILE_03

[folder b]
FILE_01
FILE_02
FILE_03

But when Automator runs this sequential renaming of files on the contents of each folder, it renumbers the files within each individual folder as if the files were all in the same folder. So it ends up looking like this:

[folder a]
FILE_01
FILE_02
FILE_03

[folder b]
FILE_04
FILE_05
FILE_06

I am adding the files in "folder groups" so that each group of files dragged into the Automator window stays in its own group (not mixed together). But Automator renames them as if they are all part of one folder.

Is there a way to keep the renaming unique to each folder within Automator? I also tried an app called ManageNameExt, but it cannot do this.

I also don't really know AppleScript at all. So any help would be very much appreciated.
 

Brian33

macrumors 65816
Apr 30, 2008
1,471
371
USA (Virginia)
I don't know how to do it with Automator, but I'm pretty sure Name Mangler can do what you want. I've found it to be a solid, well-designed application, from a reputable developer. It's a paid app, but there's a free download, and as far as I know it is full featured (for a limited time, I suppose), so you could try it out.

https://manytricks.com/namemangler/

Select the 'Sequence' operation, then in "Group By" pick "Parent Folder". If you use the Help menu and search on "group by" and pick "Renaming Actions", you'll find instructions for exactly what you want to do. Hope that helps!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.