Back to blog

Automatic File Sorting Software: How It Works

How automatic file sorting software works: folder watching, waiting for downloads to finish, rule order, name clashes and undo, shown with File Arbor.

May 7, 2026
File Arbor Team

Automatic file sorting software takes a folder that fills up on its own (Downloads, the Desktop, a scanner's output folder) and files whatever lands there by rules you write once. It looks simple from the outside: a file appears, a moment later it is somewhere else.

A lot happens in between, and it is where these tools differ. This page walks through each step, using File Arbor as the worked example. If you are comparing tools, the roundup of automatic file organizers for Windows and Mac covers that. If you want to set one up step by step, the setup guide does it in about fifteen minutes.

The five steps every file sorter goes through

  1. Something starts a pass. A new file arrives, a timer fires, or you click a button.
  2. The file is finished. The sorter waits until the file has been completely written.
  3. The rules are checked. Each file is compared with your rules, in order, until one matches.
  4. The action runs. The file is moved, renamed, sent to the bin, deleted, or handed to a command.
  5. The result is recorded. A log says what happened, so it can be checked and undone.

Each of the next five sections takes one step.

Step 1: what starts a pass

There are four ways a sorter can decide it is time to look at a folder.

Watching. The operating system reports each new file to the program as it appears, and the program reacts straight away. File Arbor's Auto Mode works this way: a file that lands in the folder and matches a rule is filed within a second or two. File Juggler's documentation describes the same behaviour; it "reacts almost instantly" to new files.

Scanning at an interval. The program looks at the folder every few seconds or minutes and sorts whatever it finds. It is simpler to build and harmless for most folders, but there is always a delay. DropIt's folder monitoring works this way: it checks monitored folders "at a defined time interval".

A schedule. The folder is sorted at set days and times, for example weekdays at 18:00, after you stop working. In File Arbor this is Scheduled mode. The timer lives inside the app, so the app has to be running at that time; a run that was missed because the app was closed is not caught up later.

By hand. Nothing moves until you click Run. File Arbor calls this Single mode. Before anything moves, it shows what the run will do and asks you to confirm.

TriggerWhen files moveGood forIn File Arbor
WatchingWithin a second or two of arrivingDownloads, Desktop, scanner foldersAuto Mode (Pro)
Interval scanAt the next checkFolders where a delay does not matter—
ScheduleAt the days and time you setWork folders you do not want changing while you workScheduled mode (Pro)
By handWhen you click RunTesting new rules, clearing out an old folderSingle mode (Free and Pro)

Two details are worth knowing. When you switch a folder to Auto Mode, File Arbor first offers to sort what is already sitting in it, so an old pile is not left behind. And the watcher looks only at the top level of the folder: files that land in its subfolders are not touched. Sorting through every subfolder is a separate, manual sweep (subfolder scanning, Pro).

Step 2: waiting until the file is finished

A file is not finished the moment it appears. A browser downloading a 2 GB installer creates the file first and writes into it for minutes. A sorter that grabbed it right away would move half a file.

Browsers deal with this by downloading under a temporary name and renaming the file when it is complete:

BrowserWhile downloading
Chromereport.pdf.crdownload
Firefoxreport.pdf.part
Safaria report.pdf.download package

That helps any sorter that matches by extension: a rule for .pdf does not match .crdownload, so the half-written file is ignored until the browser gives it its real name.

Not everything that writes files is a browser, though. A copy from a USB stick, a scanner saving a large PDF, or an export from a video editor writes straight to the final name. File Arbor waits until a new file has stopped growing for half a second before it reads it, and when several files arrive together it handles them as one batch.

Some files are never sorted at all. System files that operating systems drop into folders, such as .DS_Store, Thumbs.db and desktop.ini, are skipped, and so are files and folders you add to a folder's exclusion list (Pro).

Step 3: checking the rules, in order

A rule has two halves: which files it applies to, and what to do with them. The first half is a set of conditions.

ConditionExample
Extensionis .pdf or .docx
Namecontains invoice, starts with IMG_, ends with _final
Regular expression^\d{4}-\d{2}-\d{2} (names that start with a date)
Sizelarger than 500 MB
Agenot modified for more than 30 days
Text inside the filethe PDF, DOCX or text file contains Invoice number

In File Arbor, every condition in a rule has to be true for the rule to match, so adding a condition makes a rule narrower. Most conditions also have a "does not" form: name does not contain draft, extension is not .tmp. A Pro rule can combine up to five conditions; on the free plan a rule has one condition, the file extension.

The first matching rule wins

A file is handled once. File Arbor tries the folder's rules in the order they sit in the Rules list, and the first rule that matches takes the file. The others are not consulted.

That makes order matter whenever two rules could match the same file:

  1. PDFs whose name contains invoice → Documents/Invoices
  2. All PDFs → Documents

In this order, invoices go to Invoices and every other PDF goes to Documents. Reverse the two and every invoice lands in Documents, because the broad rule matched first. When a rule seems to be ignored, this is almost always why.

Seeing the result before it happens

Before a manual run, File Arbor shows a table of what will happen to each file: its new folder and name, and which files no rule matches. A rule you expected to catch six files that reports four hundred has a condition you did not mean, and the preview is the cheapest place to find out.

Step 4: the action

When a rule matches, its action runs. File Arbor has five:

  • Move to folder. A plain name such as Documents is a folder inside the folder being sorted; a full path such as D:\Archive sends files anywhere. Missing folders are created. The destination can be built from pieces of the file, such as the year and month it was saved, a photo's capture date or camera model, and, in Pro, values read from inside a document, like an invoice date.
  • Rename. The file gets a new name built from its date, its original name and fixed text, and stays where it is. A move can rename on the way too.
  • Move to Recycle Bin / Trash. The file can still be restored from the bin by hand.
  • Delete permanently (Pro). There is no way back, so the rule cannot be saved until you tick a confirmation box.
  • Run a command (Pro). A shell command runs once for each matching file, with the file's path, name and folder filled in. It is not available in the Microsoft Store version.

When a file with that name already exists

Sooner or later two downloads are both called invoice.pdf. File Arbor handles that with one setting that applies to every rule:

SettingWhat happens
Rename (default)The incoming file becomes invoice (1).pdf. Nothing is overwritten.
OverwriteThe file already in the destination is replaced.
SkipThe incoming file stays where it is.

A file File Arbor has renamed is renamed once, so running the same rules again never produces names like invoice (1) (1).pdf.

When a value cannot be read

Pro rules that build a name from a value inside the document, such as the date printed on an invoice, do not guess. If the value is missing, or a date such as 05/07 could be read either way round, the file is left where it is (the default) or moved to a review folder you choose, and History says why.

Step 5: the record, and undo

Every move, rename, bin send, permanent delete and command run goes into File Arbor's History with the file, the rule that matched, the destination and the time. You can filter it by action and search it by file name, which answers the question "where did my file go?" without opening ten folders.

A single move or rename can be undone from History. The file goes back to its old folder under its old name, and the rule leaves it alone until the file changes. Right after a run, Undo puts back everything that run moved or renamed. Files sent to the bin can be restored from the bin by hand; permanent deletes and commands cannot be undone. History and undo are included in the free plan.

Rules on your computer, or AI in the cloud

Everything above describes a rule-based sorter: the decision is a rule you wrote, the same file always ends up in the same place, and you can read why. File Arbor, Hazel, File Juggler and DropIt all work this way and do the sorting on your computer.

AI file sorters work differently. Instead of rules, a model reads the file name, and sometimes the contents, and suggests a folder. That needs less setup, but the decision is harder to predict, and the work often happens on a server:

  • Sparkle (Mac) processes file names on its servers, so it needs an internet connection and an account with a verified email address.
  • Sortio sends file names and folder paths to its cloud service, which uses OpenAI, by default. It also offers a local mode that keeps them on your computer.

File Arbor is the rule-based, predictable alternative, and it sorts entirely offline. Files, their names and their contents never leave your computer; apart from the Pro licence check and update checks, the app goes online only to send anonymous usage statistics. The AI vs rule-based file organizer comparison goes through the trade-off in detail.

Can you do this without an app?

For one simple rule, yes.

On Windows, a PowerShell script can use .NET's FileSystemWatcher to react to new files, or Task Scheduler can run a sorting script every few minutes. Microsoft's documentation warns that the watcher can miss events when many changes arrive in a short time. Storage Sense, built into Windows, can clean the Downloads folder, but it only deletes files you have not opened for a while; it does not sort them.

On a Mac, Folder Actions run an AppleScript or an Automator workflow when items are added to a folder, and in macOS 26 a Shortcuts automation can run when files are added to a folder. Apple's own scripting guide advises waiting until items have finished writing to disk before processing them.

What a script leaves to you is everything in steps 2 to 5. A download usually arrives under a temporary name and is renamed at the end, so the script has to handle renamed files as well as new ones. You decide what happens when a name already exists, and you keep your own log if you want to know where a file went. Two overlapping rules mean writing the order logic yourself. For one rule that is an afternoon's work; for six it is a small program to maintain.

A starter rule set for Downloads

OrderRuleConditionActionPlan
1InvoicesExtension is .pdf and name contains invoiceMove to Documents/Invoices/<Year>Pro
2DocumentsExtension is .pdf, .docx, .xlsx and more (built-in Quick Rule)Move to DocumentsFree
3ImagesExtension is .jpg, .png, .heic and more (built-in Quick Rule)Move to Images/<ExifYear>Free
4Old installersExtension is .exe, .msi, .dmg and not modified for 14 daysMove to Recycle BinPro

Rule 1 sits above rule 2, so invoices are filed before the general Documents rule sees them. On the free plan, pick the two rules that cover most of your Downloads folder (usually Documents and Images) and run them when you want a tidy-up. The Downloads folder guide has more rule sets, and the File Arbor handbook documents every condition and action.

What to check when you choose a tool

The five steps, plus where the sorting happens, make a short checklist:

  • Trigger: does it watch the folder, scan it on a timer, run on a schedule, or only when you click?
  • Finished files: does it wait until a file has been completely written?
  • Rules: can you see the order your rules run in, and preview the result before anything moves?
  • Name clashes: what happens when a file with that name is already there?
  • Record: is there a log, and can you undo a move?
  • Location: does the sorting happen on your computer or on someone else's server?

For tools that answer these questions on each platform, see the roundup of automatic file organizers, the Windows file organizer guide, the Mac file organizer guide and the folder watcher comparison.

The bottom line

Automatic file sorting comes down to five steps: notice the file, wait until it is finished, find the first rule that matches, run its action, and write down what happened. Tools differ most in steps 2 and 5, which are the ones you only notice when something goes wrong.

File Arbor runs all five on your computer, on Windows and macOS. The free plan has one watched folder, two rules, up to 20 files a day, manual runs; Pro adds Auto Mode, schedules and unlimited rules for $24.99 once. Download File Arbor and try it on your Downloads folder.

FAQ

What is automatic file sorting software?

It is software that files documents, images and downloads into folders by rules you write once. It watches a folder, runs on a schedule or runs when you click, checks each file against your rules, and moves, renames or removes the ones that match. File Arbor, Hazel and File Juggler work this way and do the sorting on your computer.

How does a file sorter know a download has finished?

Browsers save a download under a temporary name, such as .crdownload in Chrome, .part in Firefox or a .download package in Safari, and give it its real name when it completes. A rule that matches the real extension does not match the temporary file. File Arbor also waits until a new file has stopped growing before it reads it.

What happens when two rules match the same file?

In File Arbor the first matching rule wins and the file is handled once. Rules are tried in the order they sit in the Rules list, so a narrow rule such as PDFs whose name contains invoice has to come before a broad one such as all PDFs.

What happens if a file with the same name is already in the destination?

File Arbor decides with one setting for every rule. Rename, the default, gives the incoming file a number, such as invoice (1).pdf, so nothing is overwritten. Overwrite replaces the existing file, and Skip leaves the incoming file where it is.

Can I undo what an automatic file sorter did?

In File Arbor, yes for moves and renames. History lists every move, rename, Recycle Bin send, permanent delete and command run, and a single move or rename can be put back from there. Files sent to the Recycle Bin or Trash can be restored from the bin by hand; permanent deletes and commands cannot be undone.

Does automatic file sorting software upload my files?

Rule-based sorters such as File Arbor, Hazel and File Juggler do the sorting on your computer. File Arbor's files, their names and their contents never leave it; the app goes online only for the Pro licence check, update checks and anonymous usage statistics. AI sorters work differently: Sortio, for example, sends file names and folder paths to its cloud service by default.

Is there a free version?

File Arbor's free plan has one watched folder, two rules, up to 20 files a day, manual runs, on Windows and macOS. Sorting files as they arrive (Auto Mode) and scheduled runs are part of Pro, a $24.99 one-time purchase.