How To Automate File Management With Hazel

This post may contain affiliate links. Please read my disclosure for more info.

I always try to automate repetitive tasks, such as filing receipts and invoices. For exactly that reason I created a script using AppleScript to help with those tasks. Now I have discovered an even better way to do that using Noodlesoft’s Hazel. After download and installation, Hazel is accessible through System Preferences or through the OS X menu bar.

I use Hazel to automatically file (rename, move)  the following files:

  • Personal
    • Travel expenses
    • Household receipts
    • Tax-deductible receipts
    • Pay stubs
  • Work
    • Invoices to pay
    • Receipts

Before I can let Hazel do its job, I digitize most everything I get as a hard copy. When I’m at home or at my office I use a Fujitsu ScanSnap iX500 to wirelessly scan to my Mac and when I’m on the road I use an iPhone app called Scanbot. Either way, the scanned file ends up in a folder in Dropbox named Scan. This folder Hazel is monitoring for incoming files. In order for Hazel to be able to easily determine the file’s target location I’m prefixing scanned files:

  • Household receipt: HH-
  • Tax deductible receipt: TAX-
  • Travel expense: EXP-
  • Pay stub: PR-
  • Invoice to pay: INV-
  • Receipt: SEC-

Let me walk you through the rules I have set up by using my household receipts as an example. In Dropbox I have the following folder structure to archive such receipts:

Dropbox > Receipts > Household > 2014 > 05 – May > BestBuy_Dishwasher_2014_05_01_14_33_20.pdf

So I would like Hazel to move the scanned imaginary receipt HH-BestBuy_Dishwasher_2014_05_01_14_33_20.pdf into Dropbox/Receipts/Household/2014/05 – May/BestBuy_Dishwasher_2014_05_01_14_33_20.pdf while stripping the HH- prefix. I admit I haven’t spent a ton of time researching the most elegant way to carry out this task, but here is what I came up with:

1. Add Scan folder to Hazel

To add a folder click on the + button in the lower left and navigate to the folder Hazel should watch. In my case it’s Dropbox\Scan.

Add Scan folder so Hazel can monitor it