Page 1 of 1

Swapping part of a filename round

PostPosted: Tue Jun 09, 2020 5:38 pm
by the_proffessor
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.

Re: Swapping part of a filename round

PostPosted: Wed Jun 10, 2020 1:26 pm
by therube
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.

Re: Swapping part of a filename round

PostPosted: Wed Jun 10, 2020 4:03 pm
by the_proffessor
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!