← Notes

Renaming a folder you drop files into all day

Scans, exports, downloads and camera imports land in the same folder all day with useless names. Automating the rename sounds simple, and it goes wrong in three specific ways. Here is how to set it up so it doesn't.

Some folders fill up all day: a scanner's output folder, an export folder, a screenshot folder, a camera import folder. Every file arrives with a name the machine chose — Scan 14.pdf, Screenshot 2026-10-07 at 10.14.22.png, IMG_8821.HEIC — and you rename them by hand, or you do not and regret it.

Automating that rename is one of the most satisfying pieces of automation there is. It is also easy to get subtly wrong.

The built-in way: Folder Actions

macOS has had Folder Actions for a long time. You attach an Automator workflow to a folder, and it runs whenever files are added.

  1. Open Automator and create a new Folder Action.
  2. Choose the folder at the top.
  3. Add Rename Finder Items — for example, Add Date or Time using the creation date, or Make Sequential.
  4. Save.

From then on, files added to that folder are renamed automatically.

Shortcuts can do something similar on recent versions of macOS through folder automations, with more flexibility and a steeper learning curve.

The three ways it goes wrong

1. Renaming files that are still arriving

A large file — a video export, a multi-page scan, a download — takes time to write. A watcher that fires as soon as the file appears can rename it while it is still being written. Depending on the app, that leaves a broken file, a duplicate, or an app that reports that its output has vanished.

Browsers make this worse: a download often arrives first as a temporary file — .download in Safari, .crdownload in Chrome — then is renamed when complete. A rename rule that touches the temporary file breaks the download.

What you need: a watcher that waits until a file has stopped changing, and ignores partial downloads.

2. Renaming the same file again

A rename is itself a change in the folder. A naive watcher can see its own rename as a new file and rename it again — adding a second date, another number, and so on in a loop. Or, if the rule depends on the current name, produce a different result each time.

What you need: a rule that recognises files it has already processed, or a rule designed so that applying it twice changes nothing.

3. Renaming files that were already there

When you first attach automation to a folder with 500 files in it, should those be renamed too? Usually not — they may already be referenced elsewhere, or named deliberately. A watcher that processes everything on first run can rename an archive you meant to leave alone.

What you need: existing files treated as a baseline, with only new arrivals processed.

Also worth deciding

Collisions. Two scans in the same second, two exports with the same title. The rule needs something unique — a time to the second, or a counter — and a behaviour when a name already exists. Never overwrite.

Mistakes. When the rule is wrong, you want to know which files it changed and undo them, not reconstruct names from memory.

Where it runs. Folder Actions run only while you are logged in. If you want the automation available after every restart, it needs to start at login.

Trust. Automation should run on folders you choose, with rules you have tested — not on your whole Downloads folder with a rule you wrote in two minutes.

Setting it up well

  1. Decide the name pattern — usually date first: YYYY-MM-DD_HHMMSS_scan.pdf, or date plus a counter.
  2. Test it by hand on a copy of a few typical files.
  3. Attach it to one folder, used only for this purpose.
  4. Watch the first day's results before trusting it.
  5. Keep a record of renames, if your tool allows, so you can undo them.

Where RenameDeck fits

RenameDeck, a batch renamer for Mac, includes automation designed around the three failure modes above. You assign a frozen recipe — a set of rules tested in the normal preview — to a trusted folder. RenameDeck then:

  • waits until new files are stable before renaming them,
  • ignores partial downloads,
  • preserves existing files as the baseline, so only new arrivals are processed,
  • can keep running after the main window closes, with optional Launch at Login so folder rules are available after sign-in.

Collisions are detected and RenameDeck never overwrites an existing file. Renames are journaled, and a persistent, identity-protected history offers undo while the renamed file is still the one it renamed.

Recipes can combine replace, date, sequence, template, case and whitespace rules, and names can come from file-system dates, image metadata, media tags, PDF properties and parent folders. It is sandboxed with no network entitlement, account, analytics or tracking, and requires macOS 14 or later.

Keep reading