Skip to content
FileMayorby Chevza
← Back to writing

Guide · automation

How to automate file organization on Mac (without breaking anything).

Three approaches to automatic file organization on macOS — folder actions, Hazel rules, and AI-planned CLI tools — with honest tradeoffs for each.

2026.06.03 · 7 min read

There is a version of Mac file organization that runs itself. New files route to the right folders automatically, old downloads age out without manual review, and the chaos that accumulates over months stays contained. Getting there takes some setup — but once it is in place, you stop thinking about it.

There are three main approaches, and they suit different kinds of users. This guide walks through each one honestly, including where each falls short.

Built-in Mac Folder Actions

macOS has supported Folder Actions since OS X — small Automator workflows or AppleScripts that trigger when files are added to a specific folder. You attach a script to a folder in Finder, and macOS runs it whenever something new lands.

The appeal is obvious: no third-party software, no subscription, built right in. And for simple rules — rename a file, move a screenshot — Folder Actions work.

The limitations surface quickly. Folder Actions are per-folder and do not compose well. The scripting environment is Apple-specific and dated. Debugging a broken Automator workflow can eat an afternoon. And there is no concept of undo — if a script moves or renames files incorrectly, you are recovering manually.

  • Good for: simple, single-folder rules on macOS that you only need to write once.
  • Bad for: complex conditions, multiple folders, cross-platform use, or anything where you might need to reverse what happened.

Rules-based tools (Hazel)

Hazel has been the reference for Mac file automation for over a decade. It runs as a System Preferences pane, watches whichever folders you configure, and applies IF/THEN rules whenever new files arrive. Rules can match on name, content, date, file type, tags, and more, and you can chain them with subfolders, AppleScript, and shell scripts.

The power is real. A well-maintained set of Hazel rules handles an enormous range of scenarios: rename receipts, sort photos by date, move installers to a Software folder and clean up the DMG after it is installed. Power users build elaborate rule trees that effectively give their Mac a filing brain.

The cost is maintenance. Every new file type, every edge case, every folder you add to your workflow is a rule that needs writing and testing. Rules can conflict. Moving to a new machine means exporting and reimporting everything. And like Folder Actions, Hazel does not provide an undo for batched moves — once it runs, it ran.

  • Good for: power users who want precise control, live on macOS exclusively, and enjoy maintaining a rules library.
  • Bad for: anyone who wants to describe intent rather than enumerate conditions, or who needs Windows or Linux support.

AI-planned approach (FileMayor)

The third approach flips the model. Instead of writing rules first, you describe what you want, get a plan, review it, and apply it. The AI handles the logic of categorisation and routing; you handle the approval.

FileMayor works this way. You run filemayor cure ~/Downloads and it returns a structured plan: which files go where, which duplicates to remove, which stale items to archive. Nothing moves until you approve. And when you apply, every operation is journaled so filemayor undo --all reverses the entire session if the plan was wrong about something.

For ongoing watch mode — routing new files as they arrive — FileMayor Pro watches a folder and applies a plain-English policy you define once. No rule syntax to learn. If you change your mind, you update the policy and the next session reflects it.

The safest automation is one you can undo.
  • Good for: bulk cleanup sessions, anyone who prefers describing intent over writing rules, and cross-platform teams.
  • Bad for: users who want fine-grained IF/THEN control over every condition, or who need deep AppleScript integration.

Choosing the right tool

The right answer depends on how you think about the problem. If you find it satisfying to specify exactly what should happen under every condition, Hazel is yours. If you just want the mess dealt with — reviewably, reversibly — FileMayor is likely a better fit.

Many people run both: Hazel governs a watched inbox with precise conditions, while FileMayor handles the larger periodic cleanups that no rule set covers well. Folder Actions can cover the very simple cases in between without any added dependencies.

Start with the approach that matches how you already think. Automation that requires constant maintenance is not automation — it is just a different kind of manual work.

If you want to try the AI-planned approach without committing to anything, FileMayor is free to install →