Page 1 of 1

Batch Renaming (switch two parts of file name preferably)

PostPosted: Sat Jun 14, 2014 6:52 pm
by INeedHelpRenaming
Hi,
I am organizing 60,000+ images, and need to edit down their names. I would love to just do a batch rename, as this would likely take 60+ hours otherwise.

The names are similar to what follows:
2013-10-27 17_46_28-pro image plus 18234

I need to either switch "pro image plus 18234" with "2013-10-27 17_46_28" (around the hyphen located before the word pro (although the word pro does change)), or if that isn't possible, remove just "2013-10-27 17_46_28-" altogether. Definitely prefer to switch the parts of the name over deleting, so as to improve the integrity of my records.

There will always be the same number of starting characters, but after that hyphen (before pro in this example), there is a varying number of characters

Thanks very much,
John Fielder
(Sorry if there is already a forum on this, I looked for a bit and couldn't find anything about switching)

Switch 2 parts of name

PostPosted: Mon Jun 16, 2014 4:01 am
by truth
What's the alternate text to -pro that can precede image plus 5Digits?
Do all names end as image plus 5Digits?

If needed, post more OrigNames that should also get matched.
Until then, heres an example you can mod to suit your conditions:

1Regex match/replace:
^([0-9]{4}-\d\d-\d\d \d\d_\d\d_\d\d)-(pro|PRO|Professional)( image plus \d{5})$
\3\2-\1
It matches alternates as: -pro -PRO -Professional before image plus 5Digits

Another:
^([0-9]{4}-\d\d-\d\d \d\d_\d\d_\d\d)-([^ ]+)( image plus \d{5})$
It matches alternates as -AnyText(besidesSpace) until image plus 5Digits