Skip to main content
Participant
August 13, 2024
Answered

Adobe Bridge Batch Rename Expression Help

  • August 13, 2024
  • 2 replies
  • 649 views

Hi Everyone,

 

I have a PDF dataset that has a very strange name format I would like to change.

A broad example would  be:

 

test01move0 (Current format) ---> TEST_mv-1 (Desired format)

 

What I want the expression to do is:

Capitalise the first four letters (test)

Move the number to the back (01)

Change the word move to mv

Delete the 0 at the end

 

The word at the beginning can vary so if there is a way of capitalising it regardless of the word that would be ideal.

The underscore and hyphen I used in the example are also required.

 

I understood this is a lot to ask without a lot of context, so if there is any more information people need to tackle this I am happy to provide it.

 

Looking forward to hearing peoples thoughts.

This topic has been closed for replies.
Correct answer Stephen Marsh

@Thomas38809214vc8k 

 

I just realised that you wanted to keep the 2-digit number sequence, which is good if you have more than 9 files to rename... For some reason I thought that you only wanted one.

 

To correct my previous Replace command to include 2-digits:

 

$1_mv-$2$3

 

______________

 

Or with a modified Find:

 

(\D{1,4})(.{2})(.+)

 

Or:

 

(\D{1,4})(\d{2})(.+)

 

And a new Replace:

 

$1_mv-$2

 

2 replies

Stephen Marsh
Community Expert
Community Expert
August 15, 2024

@Thomas38809214vc8k – Thanks for coming back and marking my answer as correct! I'm glad this was of help.

Participant
August 15, 2024

No problem, appreciate the quick response. 🙂

Stephen Marsh
Community Expert
Community Expert
August 13, 2024

It would be helpful if you could provide more than one before/after filename example...

 

There are variations on the following, this was just the first thing that I knocked together, there might be better expressions:

 

Find:

(\D+)(.)(.)(.+)

 

Replace:

$1_mv-$3

 

Bridge Batch Rename screenshot:

 

 

 

EDIT:

 

I prefer this variation on the original Find regular expression:

 

(\D{1,4})(.)(.)(.+)

 

or

 

(\D{1,4})(\d)(\d)(.+)

Stephen Marsh
Community Expert
Stephen MarshCommunity ExpertCorrect answer
Community Expert
August 14, 2024

@Thomas38809214vc8k 

 

I just realised that you wanted to keep the 2-digit number sequence, which is good if you have more than 9 files to rename... For some reason I thought that you only wanted one.

 

To correct my previous Replace command to include 2-digits:

 

$1_mv-$2$3

 

______________

 

Or with a modified Find:

 

(\D{1,4})(.{2})(.+)

 

Or:

 

(\D{1,4})(\d{2})(.+)

 

And a new Replace:

 

$1_mv-$2