How to keep files organised the easy way
Mac Tip #409, 04 November 2009
Hazel.
Hazel is the housekeeper that can keep your Mac clean and tidy. You don’t need to think about putting away files or emptying the Trash with Hazel around.
Watch the video
Please visit the video on YouTube too, leave comments and rate it. That helps spread the word about the MacTips.
Clear the clutter
I used to always accumulate files in my Downloads folder. Before long I couldn’t find anything without endless scrolling.
One of my favourite small applications, Hazel, now keeps me organised by tidying away files, sorting them into folders, labelling them and even renaming them:
Hazel watches whatever folders you tell it to, automatically organizing your files according to the rules you create. … Have Hazel move files around based on name, date, type, what site/email address it came from (Safari and Mail only) and much more. Automatically put your music in your Music folder, movies in Movies. Keep your downloads off the desktop and put them where they are supposed to be.
Choose folders to watch
After installing Hazel go to the System Preferences and click on the Hazel icon in the ‘Other’ section. The Hazel Pref Pane opens up.
To add a folder for Hazel to watch:
- Select the
Folderstab in the Hazel Pref Pane. - Click the
+symbol at the bottom of the Folder column on the left of the Hazel window. A standard file chooser Dialog opens up. - Locate the folder to watch and click the
Openbutton. The folder is added to the Folders column.
Handle duplicates and Incomplete downloads
Hazel folder options.
Check the Throw away boxes if you want Hazel to throw away duplicate files or Incomplete downloads.
Manage Rules
- Select a folder in the Folders column.
- Add and set up rules for the selected folder as described in the section below.
- To add a rule click the
+symbol at the bottom of theRulessection. - To activate a rule check the box beside that rule. Active rules run automatically at regular intervals.
- To delete a rule select it in the list and click the
-symbol below the list of rules.
Create Rules
Hazel is capable of many actions, such as labelling a file, moving files into folders or subfolders, renaming files, adding comments and keywords, compressing files, and even running scripts such as Applescripts and Automator workflows.
Hazel has good Help files that explain all of the options.
My video shows how to set up a rule that labels certain files and move them into a subfolder based on their file extension. For example: Hazel could automatically move all files that end in .txt into a subfolder called txt-files.
Rule conditions
There are various combinations of options for each rule. Give the rule a name that helps you to remember what it does.
Hazel rule details.
Then, you must choose between All and Any of the conditions being met. This is a very important choice.
Below here you will specify various conditions — one or more. All says that the file must meet all the conditions to be acted on by Hazel, while Any says that any one of the conditions is enough to cause Hazel to act.
For example, if you set up conditions that a file must be named file.txt and it must be bigger than 20Mb (All), then a 19Mb file called file.txt would not be affected. If you had chosen Any instead then either the file size or the filename would be enough to trigger Hazel.
In my screenshot my rule has only one condition: that the extension should be .txt.
To add more conditions click the + symbol beside a condition. A new condition is added.
Rule actions
The lower part of the Rule window allows you to choose one or more actions to apply to all files that meet the conditions. My screenshot shows two actions:
- Label the matching files.
- Move matching files into a subfolder.
The blue ‘capsule’ text in the pattern match area is available when you click the triangle to the left of the word ‘Attributes’. Clicking the triangle expands and collapses the Attributes section. Drag a capsule from the Attributes section into the filename text area.
Once you’ve selected conditions and actions click the OK button to save the rule. The Rule window closes and you can again see the lists of all Folders and Rules.
Test a Rule
Some Rules could take drastic actions, such as moving files around, renaming them or even deleting them. It’s a good idea to test a Rule before you use it for real.
Select a Folder and select a Rule for that folder. Activate the Rule. Click the Gear icon below the list of Rules and choose Preview Rule matches… from the drop-down list. A window appears that shows which files will be affected by the Rule. View the list and click the Done button once you’ve assessed the effects of your Rule.
Deactivate the Rule if you don’t wish it to run automatically.
Summary
Hazel has many features, but it also has good Help files. I find it invaluable for tidying up my downloaded files. I also set it to empty old files from the Trash, while retaining newly-trashed files (look under the Trash tab).
I don’t really use all of its powers, but even those two things are enough for me.
If you like, or need, to keep things tidy, give Hazel a whirl. It costs US$22, but gives you a free 14 day trial.
Disclaimer: I’m just a happy user. I’m not being paid or rewarded in any way for talking about this software.
Do you have any comments on this Tip? Add them below.
Related Posts
- Rename batches of files Automator can help you quickly rename batches of files. Don't...
- More on copying files Mac OS X is smart about adding the word 'copy'...
- How to restore files from Apple Time Machine At some point you're bound to need files or folders...
- Moving Files between Folders Move files from one folder to another in the Finder....
- Invisible Dot Files Revealed! Use the Terminal to list all files, even those that...
Hey. Welcome back. Sign up for free MacTips updates via RSS or email, follow MacTips on Twitter and check our YouTube channel. Check for more Tips on this topic. We love your Comments too.


