Swapping part of a filename round

Bulk Rename Utility How-To's

Swapping part of a filename round

Postby the_proffessor » Tue Jun 09, 2020 5:38 pm

Hi

Is there a way to make

visit - 07_08_2013

into

visit - 2013_08_07

The format is always the same!

Thanks in advance.
the_proffessor
 
Posts: 2
Joined: Tue Jun 09, 2020 5:34 pm

Re: Swapping part of a filename round

Postby therube » Wed Jun 10, 2020 1:26 pm

1:RegEx
Code: Select all
Match:  (.*?)(\d\d)_(\d\d)_(\d\d\d\d)$
Replace:  \1\4_\3_\2

Match anything, non-greedy, up to a "date" (at the end of the file name).
Split the date into its' m/d/y parts.
Rearrange.
therube
 
Posts: 1314
Joined: Mon Jan 18, 2016 6:23 pm

Re: Swapping part of a filename round

Postby the_proffessor » Wed Jun 10, 2020 4:03 pm

therube wrote:1:RegEx
Code: Select all
Match:  (.*?)(\d\d)_(\d\d)_(\d\d\d\d)$
Replace:  \1\4_\3_\2

Match anything, non-greedy, up to a "date" (at the end of the file name).
Split the date into its' m/d/y parts.
Rearrange.


Perfect thank you for your help and quick reply!
the_proffessor
 
Posts: 2
Joined: Tue Jun 09, 2020 5:34 pm


Return to How-To