Move date from end of file name to the front

Bulk Rename Utility How-To's

Move date from end of file name to the front

Postby Boski » Mon Oct 23, 2023 8:45 am

Hello, I have multiple file names in the following format:

Filename-2020_01_24-17_24_47

And I'd like to move the complete date with hours minutes and seconds as well to the front of the file like the following:

2020_01_24-17_24_47- Filename

If someone could tell what to use in the regex it would be appreciated, I looked up multiple posts like this on the forum but still couldn't figure it out, thanks.
Boski
 
Posts: 1
Joined: Mon Oct 23, 2023 8:39 am

Re: Move date from end of file name to the front

Postby Admin » Tue Oct 24, 2023 3:42 am

You could try:

RegEx (1)

Match: %1-%2
Replace: %2-%1

Enable "Simple" option in RegEx (1)

Basically this will swap the two parts of the file name around the -
Admin
Site Admin
 
Posts: 2354
Joined: Tue Mar 08, 2005 8:39 pm


Return to How-To