Using a script to change spelled out date to YYYY-MM-DD format
I have hundreds of files that were name in this format:
Meeting Minutes (December 14, 2020).pdf
Meeting Minutes (August 24, 2020).pdf
Meeting Minutes (November 9, 2020).pdf
I would like to rename them:
Meeting Minutes 2020-12-14.pdf
Meeting Minutes 2020-08-24.pdf
Meeting Minutes 2020-11-09.pdf
I can figure out how to replace "December" with "12" and so on. And then use the move characters around so that it appears in YYYY-MM-DD format. But there must be a clever way to do that with a script. Is there a way?
Meeting Minutes (December 14, 2020).pdf
Meeting Minutes (August 24, 2020).pdf
Meeting Minutes (November 9, 2020).pdf
I would like to rename them:
Meeting Minutes 2020-12-14.pdf
Meeting Minutes 2020-08-24.pdf
Meeting Minutes 2020-11-09.pdf
I can figure out how to replace "December" with "12" and so on. And then use the move characters around so that it appears in YYYY-MM-DD format. But there must be a clever way to do that with a script. Is there a way?
Reorder with a Replace method, using a regular expression...
Replace: (.* )\(([^ ]*) (\d+), (\d+)\)
with: \1\4-\2-\3
Use regular expressions
Then add a List replace method to convert months to numeric, with one line for each month...
Replace: January with: 1
Replace: February with: 2
etc
etc
Replace: December with: 12
Replace: (.* )\(([^ ]*) (\d+), (\d+)\)
with: \1\4-\2-\3
Use regular expressions
Then add a List replace method to convert months to numeric, with one line for each month...
Replace: January with: 1
Replace: February with: 2
etc
etc
Replace: December with: 12