Simple Renaming Question: Using a date in the file name

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

Moderator: Mr_Noodle

New to Hazel (led to it by David Spark's book "Paperless" which was very helpful).

I have been able to create a rule that looks at my "Action" folder, finds pdfs by looking at the file name, and then moves them to folders (and sorts by subfolder including creating new folders by year) by using a "date match" token from within the OCR of the document"

(Can't figure out how to insert image here- not a coder!)

But how do I use a date placed in the name of the file. Such that if the name of the file is:

2015-09-09 - business expense - 30.pdf

The date gets recognized and then filed in a folder/subfolder by the year of that date?

There doesn't seem to be a way to create a date token from a date in the file name and then use that date for sorting purposes in the rule. What am I missing here?

Thanks for any help you can offer.
BroncoCountry
 
Posts: 4
Joined: Mon Sep 28, 2015 1:31 pm

Just use "Name matches" and create a date attribute there. Keep in mind, unlike when using "contains match" when searching file contents, the pattern you use here has to account for the whole filename. So, you need to also specify the parts of the filename outside of the date you are interested in. If you don't care what comes after the date, just use the "anything" token.
Mr_Noodle
Site Admin
 
Posts: 11868
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support