Hazel watches folders and automatically moves, renames, tags, or deletes files based on rules you define. It runs silently in the background as a System Preferences pane β no app window, no fussing. I use it to keep Downloads from becoming a graveyard, auto-sort receipts and invoices into dated folders, and trigger follow-on Automator or shell scripts when specific files land in watched locations. Once the rules are set, you forget it’s there.
Hazel
Automated file organization and cleanup
Hazel Cheatsheet
Rule Conditions
| Condition | Description |
|---|---|
| Name | Matches filename patterns |
| Extension | File type matching |
| Date Added | When file appeared |
| Date Modified | Last modification time |
| Size | File size comparison |
| Kind | File kind (image, document) |
| Tags | Finder tags |
| Contents | Text content matching |
| Source URL | Download source |
| Subfolder depth | Nesting level |
Matching Operators
| Operator | Example |
|---|---|
| contains | Name contains “invoice” |
| starts with | Name starts with “IMG” |
| ends with | Extension ends with “pdf” |
| matches | Name matches regex pattern |
| is | Kind is PDF Document |
| is not | Tag is not “processed” |
Rule Actions
| Action | Description |
|---|---|
| Move | Move to folder |
| Copy | Copy to folder |
| Rename | Rename with patterns |
| Add tags | Apply Finder tags |
| Set color label | Apply color |
| Sort into subfolder | Auto-organize by date/type |
| Archive | Compress to ZIP |
| Import | Import to app (Photos, iTunes) |
| Trash | Move to trash |
| Run shell script | Execute custom command |
| Run Automator workflow | macOS automation |
| Open | Open with application |
Rename Patterns
| Token | Expands To |
|---|---|
{name} |
Original filename |
{extension} |
File extension |
{date} |
Current date |
{created} |
Creation date |
{1} |
First regex match group |
Hazel Shortcuts
General
| Shortcut | Action |
|---|---|
| β, | Preferences |
| βN | New rule |
| βD | Duplicate rule |
| βDelete | Delete rule |
| ββ | Move rule up |
| ββ | Move rule down |
| βR | Run rules now |
Rule Management
| Shortcut | Action |
|---|---|
| βE | Edit selected rule |
| ββ₯N | New folder to monitor |
| ββ§N | New sub-rule |
| βT | Test rule on file |
| Space | Toggle rule enabled |