Guides

How to sort out a Downloads folder that got away from you

Sorting it by hand takes an evening, and it is a mess again by spring. Writing the rules down once means the second time costs one command.

Short answer

Do not tidy it — write the rule that tidies it. Rules in a file, checked for collisions before anything moves, run again whenever it gets bad. The first run is the same work either way; every run after that is free.

Look before you sort

A Downloads folder that has been going for years is usually four things in a trench coat:

  • Installers you already ran. Almost always the largest category, and almost always safe to remove. A machine a few years old routinely has 20–60 GB of them.
  • Documents you actually needed and never filed anywhere.
  • The same thing several times, because you downloaded it again rather than looking for it. report.pdf, report (1).pdf, report (2).pdf.
  • Things you cannot identify, which is what the whole folder feels like.

The categories want different treatment, so it is worth seeing what is actually there before deciding anything, and worth a duplicate pass before you file anything — filing three copies of the same PDF into three folders makes it worse.

Write the rule, not the tidy-up

The reason a tidied Downloads folder does not stay tidy is that tidying it is a task, and tasks do not repeat themselves.

Rules do. A rules file — a pattern, and where matching files go — costs the same first evening and then makes every subsequent tidy-up one command. It is also the only version of this that can be handed to somebody else or moved to a new machine.

Something like: *.dmg, *.pkg, *.exe, *.msi to Installers. *.pdf, *.docx to Documents/Inbox. *.jpg, *.png, *.heic to Pictures/Downloaded. *.csv, *.xlsx to Data. First rule that matches wins, and anything matching nothing stays exactly where it is and is reported — that last part matters, because a rule set that quietly swallows unmatched files is one you cannot trust.

The one thing that must be checked first

Two files ending up with the same destination path. If the tool moves them one at a time, the second overwrites the first, and that file is gone.

This is not hypothetical when you are flattening a folder: 2024/report.pdf and 2023/report.pdf both become Documents/report.pdf. So the whole batch has to be validated for collisions before the first file moves, and the run has to refuse to start rather than fail partway. A half-completed sort is much harder to reason about than one that never began.

Then make it happen by itself

Once the rules are right, the last step is not running them.

Either put them on a schedule — Task Scheduler on Windows, launchd or cron on macOS, once a day is plenty — or trigger them when something lands in the folder. Both work; scheduled is easier to reason about and restarts cleanly, and for a folder that receives a handful of files an hour it is indistinguishable from instant. There is more on the triggered version, including the mistake everybody makes, in running something when a file appears.

What the operating system gives you

macOS has Smart Folders, which are saved searches rather than sorting: files stay in Downloads and appear grouped. That is often enough, and it has the considerable advantage that nothing moves.

Finder also has Folder Actions, and Windows has Task Scheduler. Both can run something on a schedule without any extra software.

The programs for this

  • FolderForge is the rules one: a rules file, first match wins, the whole batch validated for collisions before anything moves, and files matching no rule left in place and reported. Dry run unless you pass --apply.
  • FilePilot renames rather than files — useful for the pass where everything needs a consistent name before it goes anywhere. See renaming hundreds of files.
  • FileDeck takes the plan as a spreadsheet, one row per file. validate reports every problem at once with the row number of each, and there is a journal with an undo. This is the one for a one-off sort you want to review before it happens.
  • MacroDeck runs the rule whenever something new lands, if you would rather not think about it again.

Free while we are in preview, one file each, Windows and Mac.

Do the boring safe thing first

Run it in preview mode and read the output. Point it at a copy for the first run. And keep the installers you deleted in a folder for a fortnight rather than removing them, because the one time you needed one will be that fortnight.

Other guides

All guides · All 100 programs