Renaming MM-DD-YY wherever it is in a filename as YYYY-MM-DD

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

Is it possible just to make a rule of anywhere you see a date format of MM.DD.YY rename to YYYY-MM-DD? if there are 6 separate date instances... do the first one where the first one is, second one where second one is...

e.g.
rename file
01.01.01 - 02.01.02 Receipts dated 01.03.01, 01.15.01, 01.28.01.pdf
to
2001-01-01 - 2002-02.01 Receipts dated 2001-01-03, 2001-01-15, 2001-01-28.pdf
Korgun
 
Posts: 2
Joined: Wed Sep 16, 2020 4:13 am

Are there always going to be the same number of dates? In general, you can use custom date attributes to match the dates then in the Rename pattern, edit the date formats on those dates the way you want. Problem is if there are multiple dates, how strict is the pattern and number of dates in the name?
Mr_Noodle
Site Admin
 
Posts: 11255
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

No, I imagine generally it’s 4-5 dates for the most part.

I imagine very few are more than 3, but possibly some.

I suppose I can make multiple rules
One with just one date.
One with two…. date (text) date
One with there… date (text) date (text)

Is that what you were suggesting?

Thanks
Korgun
 
Posts: 2
Joined: Wed Sep 16, 2020 4:13 am

Yes, you'll probably need multiple conditions for each of those cases. You can put them under a nested condition to keep them under one rule.
Mr_Noodle
Site Admin
 
Posts: 11255
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Did you find a solution?

I am looking for something similar, just to convert from
yyyymmdd to a token dd/mm/yyyy.
It's a shame not being able to use the "match" function on the automatic date token, as it would allow us to manipulate the dates as desired afterwards.
hercut
 
Posts: 51
Joined: Fri Dec 17, 2021 11:44 am

What is the problem you are seeing? If you have a date attribute, you can manipulate it as you like, regardless of whether it was using automatic detection.
Mr_Noodle
Site Admin
 
Posts: 11255
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

If you have alread grabbed the date with a "If contents match DATE" rule, you can very easily rearrange the date in any order which pleases you simply by clicking on the down arrow in the date parameter, as shown in the picture below. In the picture below I am specifying that the file name must start with a date in the format YYYY-MM-DD, but you could rearrange that to order such as DD/MM/YYYY

Image
Trickyt57
 
Posts: 56
Joined: Tue Sep 18, 2018 12:17 am


Return to Support