Changing Date Format for a Variety of Filenames

Advanced Renamer forum
#1 : 26/02-18 21:01
Amanda Lancaster
Amanda Lancaster
Posts: 1
Hello. I found a script from an old post with the same 'Subject' ( um_id=3582) and it did change the dates but they are all at the end in the filename.

Most of mine have the date in the beginning but I do have a few with it elsewhere in the filename. Here are some examples:

8-22-17 New Egg & Amazon Orders.rtf
8-27-17 How to Take Ownership & Grant Full Permission of Files & Folders.txt
8-25-16 $25 Ebay Gift Card.pdf
1-1-17 Sunday Afternoon Sermons.mp3
7-15-16 Synchrony Bank.doc
Low Income Energy Assistance Program 10-31-2016.docx

I am wanting them to all be at the beginning with yyyy-mm-day

2017-08-22 New Egg & Amazon Orders.rtf
2017-08-27 How to Take Ownership & Grant Full Permission of Files & Folders.txt
2016-08-25 $25 Ebay Gift Card.pdf
2017-01-01 Sunday Afternoon Sermons.mp3
2016-07-15 Synchrony Bank.doc
2016-10-31 Low Income Energy Assistance Program.docx

Thank you for your time and help. Blessings! Amanda

26/02-18 21:01
#2 : 27/02-18 10:24
Posts: 175

I looked at the script (at the edge of my understanding in this new area to me), and it seems to me that to cover all eventualities in the possible make-up of a filename, such a complex approach would be necessary. Maybe someone can advise how to modify the script to cater for your situation.

In the meantime, I look for things that might help to reduce the complexity, enabling AR to use a few Replace Methods to do what you want, in a few passes.

May I ask how those filenames are being created in the first place? Is this a one-off process on a data set or something you want to carry on using?

So, my questions:

* By any lucky chance, are the file Date Modified values the same as the dates contained in the filename?

* Are the filenames always of the types <Date><space><text> or<text><space><Date>? Or are there characters used like a "-"?

That's it for now ....


27/02-18 10:24