Copy link to clipboard
Copied
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.
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
Copy link to clipboard
Copied
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)(.+)
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
@Thomas38809214vc8k – Thanks for coming back and marking my answer as correct! I'm glad this was of help.
Copy link to clipboard
Copied
No problem, appreciate the quick response. 🙂