If you run OS X, there is one application you absolutely must have: Hazel. It is one of my favorite apps on the Mac. While we have covered a list essential Mac apps before, in this article I want to delve deeper into how Hazel can help you free up time and make the Mac experience even better.
If you are unfamiliar with Hazel, think of it like a maid or housekeeper for your Mac. Its main duty is to keep your files organized and to automate that process (you will also love Default Folder X). The program can help you automatically move files into the right folders, delete old files in your trash and a lot more.
To maximize the use of Hazel, you really need to have used the Mac for a while to figure out how you organize it. If you just switched to the Mac, Hazel won’t be of much use yet. However, if you’ve been on the Mac for a while you will like this app a lot. To use the app correctly, you just have to understand very basic if-then logic. The way Hazel works is that it performs if-then logic to each file and if there is a match then it will take action. In other words:
If X-condition(s) are true, then do Y-action(s).
For example, you can setup rules (as Hazel calls them) like the following:
- If file size is bigger than 1GB, then move it to the trash folder.
- If the folder color is green, then move it to the Documents folder.
- If the file name contains “invoice”, then color it green and make a copy in the Finance folder.
- If the file hasn’t been opened in the last 24 hours and is smaller than 10 MB, then delete it.
There are so many ways you setup rules. You can have multiple conditions and multiple actions so you can really make it as complex as you want it to be. I will show you how this little app can you make your life a lot easier and make automation seem like child’s play.
Before I get into the nifty stuff of Hazel, let’s first set it up properly. The program already comes standard with a couple default rules:
- It will color newly downloaded files blue in the Downloads folder and remove the color after one day.
- It will color files older than a certain number of days red in the Downloads folder.
The coloring of files is great because it allows you to quickly scan for the file you’re looking for. I’ve seen a lot of people sort within Finder the files by the “date modified” column so that the newest files are on top of the list, but with the coloring it can be easy too. So keep those default rules, enable them and change the parameters if you like.
Next thing is the trash settings. Go to the Trash tab and make sure Hazel will delete files in your Trash folder that are older than two weeks.
With the basics out of the way, let’s get into some cool stuff!
If you’re like me, your desktop can be a place of disaster. Screenshots and other temporary files can clutter your desktop. After a couple weeks it can look like chaos where you can’t see your wallpaper anymore.
The desktop is a great storage place for temporary files, but you have to make sure they are there temporary. Luckily, with Hazel we can manage this.
Move one-day old files
The rule below is great for this. All files that weren’t opened in the last 24 hours on your desktop are moved to a folder called “tmp” on your desktop (so make sure you create that folder on your desktop). This will keep your desktop nice and tidy.
So if you have files on your desktop that you use every day, this rule will not put those files in the tmp folder. But if you use files on the desktop like that every day, you might want to consider storing those files elsewhere.
Whenever you make screenshots they get stored on your desktop. Most of the time you will delete them and Hazel can do this for you too. You can setup a rule that will delete all screenshots made in the last X hours/days/weeks. However, I prefer to store them in a separate folder, /Pictures/Screenshots/, in case I need to go back to them. This is really useful for people who make a lot of screenshots for articles and manuals.
This rule can work together with the one above, because in my rule all screenshots get moved after an hour.
Now, it’s key that you also make a second rule for Hazel to delete very old screenshots. If you collect all screenshots in a separate folder but never empty it, you’re wasting a lot of space. So make sure you make a new rule for your screenshot folder that deletes files older than 4 weeks (like in my case).
Here’s how you set it up. Add the screenshots folder to Hazel by pressing on the plus sign on the bottom left. Then add this rule.
Then add this rule.
Now we are going to tackle a monster: the Downloads folder. This is the folder you have to watch and maintain the most but luckily Hazel can help us here. Like I said earlier, by default Hazel will color new files but we’re going to add some extra rules to this folder.
Remove torrent files
If you download a lot of torrents, this rule will delete any torrent file after two minutes. Torrent files clutter up your Downloads folder so you want to delete them as soon as possible. Here’s the rule to set it up:
Remove DMG files
DMG files can take up a lot of space and I prefer to delete them after a day. If you like to store your DMG files, you can setup a Hazel rule to move them to a separate folder, e.g. Apps, and then with another rule empty that folder if you like.
But the rule below will show you how to remove DMG files after a day.
NOTE: The rule does not apply to DMG files in subfolders, which is great if you want to save your DMG files.
This is one cool trick you can do with Hazel: actions based on color labels on files or folders. Within Finder you can give files and folders a color (right click and then assign a color). You can use this in conjunction with Hazel rules and you can create some really simple and effective rules.
Some ideas you can use for color based actions:
- Give financial reports, invoices and receipts a green color and let Hazel move them to a specific folder.
- Give video courses a yellow color and let Hazel move them the Movies folder (that’s where I store all my video courses and movies).
You can get creative with this and I highly recommend you play around with this. It makes your life so much easier in so many ways. It’s not just limited to the Downloads folder, you can apply this to any other folder. Below is an example I use. For specific reports I always assign them a purple color and then I let Hazel move them to my Reports folder where I can find all my reports.
PDF files and ebooks
If you are an information junkie and like to read a lot of PDF documents on your iPad, like yours truly, you will love this one. The basic idea is that you have a folder in Dropbox where you store all your PDF documents and/or ebooks, and you point all your digital readers to sync with that folder. On your iPad and/or iPhone, you need a PDF reader that can sync with a Dropbox folder. I use PDF Expert (although I hear GoodReader is pretty good too).
Where Hazel can help is by automatically moving PDF files and ebooks to this folder. I actually wouldn’t recommend you automatically move every PDF file because not all of them will be ebooks or documents you want to read. So what I do is I make a folder “ebooks” within the Downloads folder and then have a Hazel rule that will move all files from the ebooks folder to the ebooks folder on Dropbox.
Whenever I have downloaded an ebook, all I need to do is drop it into the ebooks folder and Hazel will automatically move it to the right (sync) folder. Then whenever I need to access the ebook on my iPad or iPhone, I can access it without any problems.
Here’s the rule for Hazel:
- First, make a folder “ebooks” in your Downloads folder.
- Add a new folder inside Hazel by pressing the + button on the bottom left.
Here is the Hazel rule for moving the files inside the “ebooks” folder:
If you are an Omnifocus user, you need to have this rule for Hazel. Omnifocus makes a lot of backups on your hard drive and if you don’t delete the old ones you’ll waste a lot of space. Luckily Hazel can help us here.
First, find out where you store your Omnifocus backups. Here’s how you find the storage location:
- Go to Preferences (or press CMD and ,)
- In the General tab, it will show you where your backups are stored.
Now let’s create a Hazel rule that will delete all backups older than two weeks:
So that wraps up Hazel in a nutshell. I hope some of my own examples of how I use Hazel inspires you to come up with your own custom rules. If you have some awesome rules to share, post them in the comments below!
Do you want to see more examples of our personal systems and workflows? We reveal them all on our Personal Systems seminar. It’s completely free and you’ll get to see the exact step-by-step systems and workflows that we personally use to be insanely productive. Register for the next available seminar here.