How I use Hazel
Some people are interested in Hazel, but don't really know how to use it. I'm no expert but have been using it for the last few years, so thought I'd share how I use it...
Keeping the Desktop clean
One of the more obvious uses for Hazel is to keep the Desktop clean. When creating rules for Hazel it's a good idea to specify some things that you don't want it to process with the app. Rules run in order from top to bottom, so the rules to tell Hazel to ignore something should be placed at the top.
This tells Hazel to ignore any files or folders that have colour labels, aliases, Smart Folders, and a folder I use called Inbox.
So on the Desktop if a file or folder I've dropped there has been there for over a day it gets moved to a folder on the Desktop called Inbox (it also runs a script to show a Growl notification that let’s me specify what icon to show, rather than using Hazel’s built in Growl notification showing Hazel’s icon).
Some people don’t like Growl/notifications and they’re not really necessary, but just I use them to let me know that things are still working properly.
The Inbox folder is a temporary place for me to dump things to tidy up the Desktop. If I want to keep a file on the Desktop for longer than a day I usually add a colour label so I know Hazel will ignore it. Sometimes I'll dump things there manually, but most of the time I'll let Hazel do it. More on what happens to the files in the Inbox folder later...
I use an app called Tags to add tags to some specific files. When I was redesigning my website if I saw a website I liked, website element, colour etc. I'd drag the image to the desktop and tag it 'inspiration'. Hazel would see the tag and move any files with it to a specific folder.
Dropbox Shared Folders
I use Dropbox a lot, and I have quite a few shared Dropbox folders between friends and clients. At the moment I share, or am a member of 22 shared folders. I moved them all to a folder in Dropbox called Shared Folders (once you've created or joined a shared folder you can rename it and move it anywhere in Dropbox with breaking the link to the shared folder).
I set up some Hazel rules so that if a file is dropped in any of the shared folders (or their sub folders) Finder will open up a new window showing the file, which is pretty useful.
I also added a similar workflow to my iDisk Public folder.
To make Hazel work in all sub folders of the main folder this rule should be placed at the top.
Changing App Icons and Other App Resources/Images
For some apps I change the app icon, and sometimes image resources within the app (usually toolbar icons, but sometimes other resources as well). If apps are updated regularly it can be a pain to keep changing these resources every time. So I have some Hazel rules watching the Applications folder. If they see an app has been updated it runs an Automator workflow to automatically update the icons/resources.
This doesn't work with apps such as iTunes (but who the hell would want to change that icon anyway?!) and apps downloaded from the App Store, as you need to authenticate replacing files in those. Maybe I'll look into a way of automating changing resources with those apps too in the future.
Using Automator to change app icons and resources
Downloads Folder
I have a few different Hazel rules watching the Downloads folder.
I keep fairly up to date with latest beta version of Dropbox from their forum. I have a MacBook Pro and Mac Mini that I sync files through Dropbox, so when I download the latest version of Dropbox (on my iMac) I want to update it on those computers too. So once I've downloaded a new Dropbox .dmg file it’s moved to a specific folder in Dropbox so that it syncs to both the other computers. They have Hazel running too, and when when they see a new Dropbox .dmg file they mount it so that the next time I use or check those computers I can update them. Hazel moves these .dmg files to the trash after 8 weeks.
Update:
I've now set it up to automatically update Dropbox after downloading the latest DMG file. So after downloading it on 1 computer it's moved to a folder in Dropbox so that it's synced to all computers. Then Hazel running on each computer updates Dropbox to the new version. Check out the post Update Dropbox using Hazel (after downloading the latest DMG file).
Workflow on my iMac (main computer)
Workflow on my Mac mini and MacBook Pro
My Mac mini as well as being used as a media centre also automates the process of downloading TV shows, copying them to the relevant folders and renaming the files so that they're recognised in Plex. This article explains that process. On the odd occasion I download a .torrent file to my iMac, Hazel moves it to Dropbox. The Mac mini will see it in Dropbox, open it and download the file.
Moving/Copying Files to Other Computers
Sometimes I want to send files to other computers, or if I download an app (or an app update) on my iMac I'll want to send that app to the other computers.
In Dropbox I have one folder called 'For Mac mini' and another folder called 'For MacBook Pro'. If I want to send a file or app to those computers I copy them to those folders (usually via LaunchBar which makes it quick and easy). If I want to send a file or app to both computers I right click on it and select an Automator workflow/service that will do this. On the other computers Hazel moves any files in those folders to the Desktop. If they're apps it will move them to their Applications folders (I only do this if the app isn't running all the time).
My Mac mini is always on so I could mount it on the iMac and move or copy files that way, but my MacBook Pro is often closed so that wouldn't work there. Using Hazel means it doesn't matter if the computer in on or not. Plus I can send files to more than 1 computer at once (with an Automator workflow). This way could also be useful to send files to another location (e.g. computer at work).
I use LaunchBar for moving and copying files and folders to different places. What I'll usually do is select a file or folder on the Desktop, hit the Option key which sends it to LaunchBar and then type formm (to send to the ‘For Mac mini’ folder) or formb (to send to the ‘For MacBook Pro’ folder).
Worflow on the Mac mini and MacBook Pro to move the copied files
Automator workflow to copy a file or folder to both the Mac mini and MacBook Pro (from iMac)
Dump Folder
The Dump folder is a central store (on an external disk) where files that I haven’t touched are moved to from various locations on my computer after a set period of time. Here's how it works:
On the Desktop files are moved to the Inbox folder after a day. If they've been in the Inbox folder for a week they're moved to the Dump folder. Files that have been in the Downloads folder for more than a day are also moved to the Dump folder. This folder organises files added to it into sub folders depending on their file type. Images are stored in an Images folder. Video files are stored in a Video folder. Zip files, .dmg files and pckg files are stored in an Apps folder. Documents such as .rtf, .pages, .txt, doc, .pdf .numbers etc. are moved to a Documents folder. If it's a folder that's moved there it could contain anything so this is moved to a folder called 'Unsorted Folders' If I've had a file in the past and haven't organised it manually it will be in the Dump folder. Folders moved to the 'Unsorted Folders' folder can contain any old crap, so after six weeks Hazel runs an Automator workflow on these that will move it to the Desktop, label it red so that 1. I'm aware of it and 2. (as it has a colour label) Hazel won't move it back to the Inbox folder and then the Dump folder. It also shows a notification telling me to trash the folder or move it?!
Dropbox iPhone/iPad to Desktop apps and Folders
These ideas came from @Digeratii on Twitter, where you can send any photo or screenshot from your iOS device to an app or folder on your Mac. On your iOS device you’d choose where you’d want to send the image with the Dropbox app. You’d select the image and Dropbox would send a copy to that folder.
On your Mac if Hazel found an image in any of these folders it would either open the image with the appropriate app or move it to the appropriate folder.
Update:
Send web pages from iPhone/iPad to open up on my iMac
I use Hazel and Dropbox to open web pages on my iMac that I've viewed on my iPhone or iPad using this tip from MacStories.
(I know about Instapaper and Read It Later but usually forget to use them or use them to read articles. I use this if I want to look at something or download something when I get back to my iMac.)
Download Pinboard Bookmarks as .webloc files
This is from Brett Terpstra's website.
Hazel detects when I've added a new bookmark to Pinboard and downloads it as a .webloc file, adds a thumbnail preview and adds OpenMeta tags. (It's pretty useful to be able to search all of your Pinboard bookmarks in Spotlight.)
Also check out:
Using Hazel and Automator to process downloaded TV shows
Better Hazel rules for renaming & sorting TV Shows
Update Dropbox using Hazel (after downloading the latest DMG file)











