0

I am presented by a task of updating a long list of filenames (and this will be useful for other projects too) whereby only a certain portion in an existing filename has to be renamed. I am restricted to using Adobe Bridge which can use RegEx in its Batch Renaming tool I understand.

Original filename structure:

AB0114 Cumbria Road Figure 1 (R1)

AB0114 Cumbria Road Figure 2 (R17)

AB0114 Cumbria Road Figure 3 (R23)

AB0114 Cumbria Road Figure 4 (R56)

Etc.

However they are to be renamed only with the "Figure #" changing into a new sequential order (because new files have been inserted mid-sequence), such as:

AB0114 Cumbria Road Figure 9 (R1)

AB0114 Cumbria Road Figure 10 (R17)

AB0114 Cumbria Road Figure 11 (R23)

AB0114 Cumbria Road Figure 12 (R56)

Etc.

Testing out what I've found elsewhere on https://regex101.com/ I seem to have been able to isolate the necessary part that needs substituting in:

(?: ?\G|^AB0114 Cumbria Road )((?:Figure |[0-99])+(?: |$))

...but this is where I'm lost!

How is best to replace just the old "Figure #" sequence and substitute it with a new "Figure #" sequence? The sequence in both old and new will be digits from 1-99.

Many thanks!

  • It seems that the tool can assign Sequence Number on its own. https://www.photoshopessentials.com/essentials/how-to-batch-rename-images/ – PM 77-1 Nov 16 '22 at 17:11
  • Unfortunately the nature of the parenthesized information at the end of each filename (which must be presevered) means I can't run a regular Batch Rename with a new (correct) text string; as that information is specific to the file's content and annoyingly non-sequential. – a_dr_wilson Nov 16 '22 at 17:29

0 Answers0