Mr_Noodle wrote:To do this, you need to use match patterns and custom tokens (search the help on these).
You basically, want to create custom tokens to match the month, day and year. While re-using the date and year from the original file name shouldn't be an issue, translating the month from a textual name to a number is tricky. Hazel just knows that you capture the month as a bunch of text; it doesn't know that it's a month. One thing you can do is after you drop your custom month token into the rename pattern, click on it and do "Replace Text...". From there, you need to provide replacements of month names to years, like "Jul -> 07".
If you have questions about the above, reply back.
How would I use Hazel to reformat the filenames of any files that may land in my Downloads folder containing an embedded date in the format mm-dd-yy to look like: YYYY-MM-DD {rest of original filename except the mm-dd-yy date}.
Example: Bank statements downloaded from bank websites often are named {Bank name} statement mm-dd-yy.pdf
I'd like to automatically reformat these filenames to YYY-MM-DD {Bank name} statement.pdf