New user needs help with Hazel and AppleScript

Hello everyone…

I’m a long-time Evernote user, since 2008, who is contemplating a switch over to DEVONthink. I have used a combination of Keyboard Maestro, Hazel, and AppleScript to move data from various apps to Evernote. Below is a typical Hazel rule I use to move a downloaded credit card statement to Evernote.

I like to change the creation and modification dates of the note to the actual billing date for proper sorting. I’m having some trouble duplicating that using AppleScript within Hazel. Any assistance someone in the know might be able to provide will be greatly appreciated.

Below are screen shots of a typical Hazel rule and AppleScript I have been using.



Why do you want to use Hazel? A DEVONthink Smart Rule could do this, I think.


To answer your question, Hazel has worked well for me and I thought it would be a good place to start for entering certain documents into DEVONthink. Hazel grabs a matched document upon arrival in my downloads folder, OCRs it if necessary, renames and changes document dates adds tags, then deposits it in the proper notebook in Evernote.

I had investigated Smart Rules and thought the options for changing Creation and Modification Dates quite limited and not useful for my use in this instance. Upon your suggestion I gave Smart Rules another try and found changing Creation and Modification Dates to the Newest Document Date worked. I tried it with a different financial statement and was successful again.

My concern in using Newest Document Date is that the billing date is not the newest date on a credit card bill…it’s the due date. I’ll use Newest Document Date in rules at the end of the month when I process invoices, bills, and statements…hopefully I won’t run into any issues.

Thank you @pete31 for suggesting I revisit Smart Rules…