Moving two parts of dates during rename

A swapping-ground for Regular Expression syntax

Moving two parts of dates during rename

Postby SDNZ » Fri Sep 20, 2024 4:10 am

Hi all,

I am trying to rename a bunch of files / folders that have the dates in the filename currently written as "filename_DD_MM_YYYY", but would like them to be named "filename_YYYY_MM_DD".

I have manually been moving the last 5 characters (_YYYY) to position x to move the year, renaming, then moving the last 3 characters (_MM) to position x to move the month, but this is very cumbersome. Is there a away to move the year and month (and the underscores) at once? Happy to use RegEx or Java, or whatever's easiest.

Cheers
SDNZ
 
Posts: 1
Joined: Fri Sep 20, 2024 4:00 am

Re: Moving two parts of dates during rename

Postby Admin » Fri Sep 20, 2024 6:55 am

Hi , maybe the easiest is to use Name (2) -> Reformat Date in the new version 4:
viewforum.php?f=1
Admin
Site Admin
 
Posts: 2504
Joined: Tue Mar 08, 2005 8:39 pm


Return to Regular Expressions