Custom renaming

Joined
Sep 27, 2016
Messages
2
Reaction score
0
Hi All,

I've used Automator in the past for some very basic renaming but a current issue is beyond my grasp and I haven't been able to find an answer elsewhere. I'm working with hundreds of image files for a book which all adhere to a naming convention created by my workplace.

The problem is that an image is being deleted and I'd obviously like to avoid manually renaming the rest of the chapter. Renaming the rest of the chapter is within my skill set– where I'm getting stuck is that some of the file names are identical save for an additional letter.

This is probably a bit confusing so I'll explain in a bit more detail. The files are numbered like this: xxxx_yyy_fig_zzz.ext. The digits in the x space represent the project's unique number, the digits in the y space represent the chapter number, fig classifies the file as a figure as opposed to a table, and the digits in the z space represent the file number. However, for this project some of the figures have multiple parts (a, b, c,) so these are named xxxx_yyy_fig_zzza.ext, xxxx_yyy_fig_zzzb.ext, etc. Is there any way that I can use automator to increment the digits in the z place while retaining the part-designating letters?

To hopefully simplify this, please see my screenshot. Let's say that 10344_005_fig_001 was being deleted. How could I use automator to rename the rest of the chapter to make up for this change while not losing the 6a and 6b designation.
 

Attachments

  • Screen Shot 2016-09-27 at 1.12.00 PM.png
    Screen Shot 2016-09-27 at 1.12.00 PM.png
    19.1 KB · Views: 350

Cory Cooper

Moderator
Joined
May 19, 2004
Messages
11,102
Reaction score
492
Hello and welcome.

I am not very well-versed in Automator/AppleScript, and that type of workflow is way above my experience level. Maybe the folks over at MacScripter could lend a hand.

Sorry,

c
 
Joined
Sep 27, 2016
Messages
2
Reaction score
0
Thanks for the answer Cory. I think I'm just gonna suck it up and buy a better finder rename.
 

Cory Cooper

Moderator
Joined
May 19, 2004
Messages
11,102
Reaction score
492
No worries...that's what I use! I was gong to suggest that, but some folks like to script it themselves or don't want to fork over the cash. ;)

C
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top