In the two previous tutorials in this series on Hazel—the automated file management app from Noodlesoft—I showed you how to create an Inbox and use rules to keep a Mac clutter free, and then how to add more rules to make the set up even more powerful.
In this tutorial I will show how to sync the files in the Inbox between two Macs, each with their own Inbox setup.
To be able to use the information in this tutorial you will need to have read, and implemented, the following three articles on Tuts+.
- 9 Hazel Rules To Increase Your Productivity
- Keep a Mac Clutter Free With Hazel 3 and an Inbox Folder
- Taking Hazel 3 and the Inbox to the Next Level
You need two Macs to sync the Inbox between. I have my Hackintosh and my Macbook, though any two Macs will do.
You also need a copy of Hazel 3—available from the Noodlesoft website for $29—on both Macs. There’s a 14-day free trial but, as I mentioned last time, if you’re going to the effort of working along with these tutorials you’re better to buy it straight off.
The full setup covered in this, and the previous tutorials, takes a few hours to get working properly. Hazel works as promised and if you want to replicate the Inbox I have on my Mac you’ll need it. Spending a weekend setting things up to get two weeks of use just isn’t worth it.
Finally, you need Dropbox, or another folder syncing app, installed on the two Macs. Dropbox offers 2GB of storage for free and it can be increased to 8GB by getting your friends to sign up too. Download and install the app from the Dropbox website.
You can download the rules I use from the sidebar on the right. If you use my exact setup you can use the rules as is, otherwise you can tweak them so they work for you.
Getting Set Up
While following this tutorial, it’s best if Hazel doesn’t start acting on files prematurely. Before starting, click on Hazel’s menubar icon and select Stop Hazel on both Macs.
Both Macs should have something similar to the Inbox setup I described in the first tutorial. Once Hazel has been paused, go through the Inbox on the Macs and clear them of any files. This will ensure there are no conflicts when Hazel starts syncing the Macs for the first time.
The Sync Problem
Syncing files between computers is a notoriously difficult problem. There are countless ways for issues and conflicts between files to arise. While this setup is designed to minimise the potential for problems, no file syncing system is bulletproof.
It’s better not to have the same file open and being edited on different Macs at the same time. Instead this setup should be used for making sure that urgent files—in my case it’s normally screenshots—are available on all your Macs.
The Inbox, anyway, isn’t where you should be storing files you are working on. They should be sorted out to other, more specific, folders.
Setting Up the First Inbox Sync Folder
First, create a new folder in the Dropbox folder called Inbox Sync. Inside it create two folders, one for each Mac. Mine are called iMac Sync and Macbook Sync.
Next, open the Hazel Preferences Pane on your main Mac—in my case it’s the Hackintosh—and create a new rule that targets the Inbox called Sync Inbox. Position it so it’s second, after Dive Into Folders.
Have it match any file that the Kind is not Folder, the Date Last Modified is in the last 20 minutes and the Tags does not contain tags macbook and then Add tags iMac and Copy to folder iMac sync.
Click Options and select replace the existing file under the If file exists menu.
Create a second rule immediately after Sync Inbox called Strip Macbook Tag. Have it match any file that Tags contain tags macbook and the Date Last Modified is not in the last 30 minutes and then Remove tags macbook.
Combined, these two rules mean that any recently modified file, but not folders, will be copied into the Inbox Sync folder with the tag iMac. Files that have just been copied over from the other Mac won’t be copied again because of the macbook tag that’s assigned to them.
Without this, there’s the potential for a file to get caught in a permanent loop being copied across from one Mac to the other.
Sorting Synced Files
Fortunately, I already have a great set of rules for sorting a random assortment of files into the Inbox: the same rules you use on the Desktop and Downloads folders.
In the Hazel Preferences Pane add the MacBook Sync folder and copy the rules that target the Desktop to it by select them and then holding Option as you drag them across.
Go through each rule and change the Move options to replace the existing file.
Setting Up the Second Mac
On the other Mac, the set up is identical except for a couple of changes to the target folders and tags.
Change the Inbox Sync rule so that the files are moved to the MacBook Sync folder, that the macbook tag is applied and that the iMac tag is used to exclude files. Also change the Strip Macbook Tag rule so that it targets the iMac tag—you might want to rename it to Strip iMac Tag.
Finally, copy the Desktop sort rules over to the iMac Sync Folder and start Hazel on both Macs.
I’m quite happy to sync everything between both Macs, however you may want to add limits to what is synced for your setup. I have a fast Internet connection and a Dropbox Pro account so large files being synced isn’t a concern for me.
You can add a rule that excludes files above a certain size, or video files as they tend to be the largest, to your Inbox Sync rule if you’re concerned.
This workflow could also be expanded to work with more than two Macs.
If you’ve followed along with all three tutorials you now have a serious auto-sorting Inbox setup on all your Macs. Anything that’s downloaded or imported in some way will be synced between them so you always have access to it.
If there’s any potential problems you’d like me to try and solve with Hazel 3, please post them in the comments below.
Subscribe below and we’ll send you a weekly email summary of all new Computer Skills tutorials. Never miss out on learning about the next big thing.Update me weekly
Envato Tuts+ tutorials are translated into other languages by our community members—you can be involved too!Translate this post