Move characters in the same word how to

Bulk Rename Utility How-To's

Move characters in the same word how to

Postby AF8 » Tue May 02, 2023 7:10 pm

Hi, i've read some of the posts on here including the manual example and need a little support.

Here is what I'm trying to do, move characters around, I have a file for example: "5-2-23 this is a file.doc" I want to move the year to the front of the front so it looks like this "23-05-2 this is a file.doc"

I have tried the RegEx per the manual:

Match > %1-%2-%3 %4
Replace >%3-0%2-%1 %4

This works however the problem is if the month is 10-12 than it poses a problem. How would I go about having this handle months 01-09 and automatically making months 10-12 renamed properly?

Thanks
AF8
 
Posts: 3
Joined: Tue May 02, 2023 7:03 pm

Re: Move characters in the same word how to

Postby AF8 » Tue May 02, 2023 7:45 pm

Well I have another problem.

This Regular expression works for this file name "5-2-23 this is a file.doc" but if the date is "12-15-23 this is a file.doc" it actually outputs "23-15-12 ..." I don't understand why it moves the month and date?

Match > %1-%2-%3 %4
Replace >%3-%2-%1 %4
AF8
 
Posts: 3
Joined: Tue May 02, 2023 7:03 pm

Re: Move characters in the same word how to

Postby AF8 » Tue May 02, 2023 8:44 pm

Alright,

I believe i have figured it out for anyone with same question:

RegEx(1)
Match %1-%3-%2 %4
Replace 20%3-0%1-%2 %4


Replace(3)
Replace -010|-011|012
With 10|11|12

What a great utility
AF8
 
Posts: 3
Joined: Tue May 02, 2023 7:03 pm

Re: Move characters in the same word how to

Postby Admin » Wed May 03, 2023 5:37 am

Nice! 8)
Admin
Site Admin
 
Posts: 2354
Joined: Tue Mar 08, 2005 8:39 pm


Return to How-To