Skip to content

File Organization Rules an AI Agent Can Build for You: A Conditions & Actions Cookbook

Published on

An AI agent composing file organization rules from condition and action templates

Quick answer: FinalPlace’s rule engine gives you eight condition types and twelve action types to combine into file organization rules. When you connect an AI agent through the file organizer CLI, you stop picking options from menus — you describe the mess in plain English, the agent assembles the rule from condition and action templates, previews it with zero changes to your files, and runs it after your confirmation. This cookbook explains the grammar and gives you seven recipes you can paste to your agent today.

If you have ever abandoned a folder-cleaning session halfway through, the problem usually is not motivation — it is translation. You know what you want (“this year’s screenshots go into folders by month”), but converting that intent into clicks, folder trees, and naming conventions is tedious enough that the mess survives another week. Industry surveys of office workers consistently estimate that people lose one to two hours per week locating files they already saved — time lost to folders nobody had time to structure.

FinalPlace, a Windows rule engine for local file organization, approaches the problem with a compact grammar: a rule pairs one or more conditions (what to match) with one or more actions (what to do). The engine offers eight condition types — file extension, name patterns, size, age, and even a content keyword match that reads inside documents — plus twelve action types, including move, copy, rename, and compress. Four conflict-handling strategies decide what happens when two files collide, and the entire engine runs completely local and offline, so your files never leave the machine.

That grammar is what makes rules agent-friendly. An AI assistant does not need to imitate your mouse; it needs to compose well-formed sentences in the grammar. This is the fourth article in our series on running FinalPlace with an AI agent — start with the series overview if you are new.

The agent works alongside the FinalPlace desktop app through the command-line interface. The executable lives at "C:\Program Files\FinalPlace\FinalPlace.exe" (not added to PATH by default, so the agent uses the full path alongside the desktop app). Two read-only commands expose the vocabulary:

Terminal window
"C:\Program Files\FinalPlace\FinalPlace.exe" condition-templates list
"C:\Program Files\FinalPlace\FinalPlace.exe" action-templates list

Both return JSON, so the agent can enumerate every condition and action type with the parameters each accepts. When you make a request, the agent translates it into an auto-rules create call:

Terminal window
"C:\Program Files\FinalPlace\FinalPlace.exe" auto-rules create --name "downloads-screenshots" --source "C:/Users/you/Downloads" --condition "ext:jpg,png" --action "move:C:/Pictures/{Year}/{Month}" --enable

Placeholders such as {Year} and {Month} are resolved from each file’s timestamp at run time, which is what makes date-based archiving possible inside a single action target.

Before anything touches your disk, the agent verifies the rule with a zero-change dry run:

Terminal window
"C:\Program Files\FinalPlace\FinalPlace.exe" auto-rules preview --uuid <UUID> --path "C:/Users/you/Downloads/pic.png"

The preview reports where the file would go without moving it. Execution then requires an explicit --confirm flag, and every command responds in JSON so the agent can verify results.

Each recipe is a plain-English request you can paste to your agent, followed by the condition × action combination it typically produces. Treat them as starting points; the agent adapts paths to your machine.

Recipe 1 — Sort the Downloads folder by type

Section titled “Recipe 1 — Sort the Downloads folder by type”

Request: “Everything I download should go into typed subfolders: installers, documents, images, archives.”

Combination: one rule per type, matching ext: conditions (for example ext:exe,msi) paired with a move: action into C:/Downloads/Installers. Add a final rule that moves whatever remains into a To Review folder, and Downloads quietly cleans itself.

Recipe 2 — Archive screenshots by year and month

Section titled “Recipe 2 — Archive screenshots by year and month”

Request: “Screenshots go to Pictures, sorted by year and month.”

Combination: source C:/Users/you/Pictures/Screenshots (or wherever your print-screen tool saves), condition ext:jpg,png plus a name pattern like Screenshot*, action move:C:/Pictures/{Year}/{Month}. This is the rule from the create example above — a one-line fix for the folder that grows faster than any other.

Recipe 3 — Collect invoices and receipts into one place

Section titled “Recipe 3 — Collect invoices and receipts into one place”

Request: “Any file that looks like an invoice or bank receipt gets copied into my Finance folder.”

Combination: a name-pattern condition matching invoice and receipt styles (many banks prefix e-statements) plus a copy: action — copy rather than move keeps the original attachment untouched. Industry surveys of small-business owners report that month-end reconciliation routinely eats an afternoon, and scattered downloads are a leading cause; one collection rule cuts the search to seconds.

Recipe 4 — Compress a finished project for handoff

Section titled “Recipe 4 — Compress a finished project for handoff”

Request: “When a project looks done, zip its folder and move the archive to Deliverables.”

Combination: a condition matching the project folder and its age (nothing modified for 30 days), action compress into C:/Deliverables/{Year}/. Compression is one of the twelve action types, so archiving is a first-class step in the rule rather than a manual chore you postpone.

Recipe 5 — Route documents by what is inside them

Section titled “Recipe 5 — Route documents by what is inside them”

Request: “Contracts go to Legal, anything mentioning payment terms goes to Finance — decide by content, not filename.”

Combination: the contentKeywordMatch condition type reads inside files, so a rule can match documents containing “agreement” or “statement” however they were named, then move: them into the right library. This is where the grammar beats manual sorting: you cannot eyeball three hundred PDFs in an evening, but the engine can — locally, with no upload.

Recipe 6 — Archive music and video downloads by media type

Section titled “Recipe 6 — Archive music and video downloads by media type”

Request: “Music and video files should leave Downloads and live in my media library, split by type.”

Combination: condition ext:mp3,flac,wav with move:C:/Media/Music, and a second rule for ext:mp4,mkv,mov with move:C:/Media/Video. Files keep their names, so your player’s library picks them up without re-indexing.

Recipe 7 — The catch-all sweep that never overwrites

Section titled “Recipe 7 — The catch-all sweep that never overwrites”

Request: “Whatever no rule caught gets moved into a Sort Me folder — and never overwrite anything.”

Combination: a broad fallback rule combined with one of the four conflict-handling strategies, for example keep-both-and-rename. Deciding collisions up front is what separates a tidy archive from silent data loss, and it costs one sentence in your request.

Safety: preview first, confirm, roll back if needed

Section titled “Safety: preview first, confirm, roll back if needed”

Three habits keep agent-built rules safe. First, always preview — the dry run with --uuid and --path costs seconds and changes nothing. Second, treat execute --confirm as a deliberate act; read what the agent shows you before allowing it. Third, remember that every run is logged: logs list shows what each rule did, and logs rollback undoes a run that did not go as intended. Industry surveys of teams adopting AI assistants report that trust in what the assistant will change remains a major adoption barrier — which is why previewable, rollback-supported workflows matter more than raw speed. Because everything runs locally and offline, an agent experiment never has to be permanent.

FinalPlace ships an agent skills package that documents this vocabulary in a format agents can read. If you followed the earlier installation and setup guide, the agent skills directory is already in place — often a .agents directory, depending on where your assistant looks for skills. The FinalPlace auto-organize skill page summarizes what the agent can do once it is active.

Licensing on the English site has four options: 3 months for $10, 1 year for $28, 3 years for $58, and a lifetime buyout for $88. Start with the 3-month plan to evaluate the workflow with your own folders, then move to a longer horizon if it sticks.

Can the agent invent conditions or actions FinalPlace does not support?

Section titled “Can the agent invent conditions or actions FinalPlace does not support?”

No. The agent composes rules from the templates it discovers through condition-templates list and action-templates list — eight condition types and twelve action types in the current engine. Ask for something outside that vocabulary and a well-behaved agent will say so, then propose the closest supported combination.

Will an agent-built rule touch my files without asking?

Section titled “Will an agent-built rule touch my files without asking?”

Not if you follow the flow in this cookbook. preview makes no changes, and execute requires the explicit --confirm flag. An assistant that skips the preview step is a signal to ask for the dry run first.

What happens if two rules match the same file?

Section titled “What happens if two rules match the same file?”

The rule engine provides four conflict-handling strategies, and the agent selects one when creating each rule. Ask for “never overwrite” behavior in your natural-language request and the agent picks the matching strategy — as in Recipe 7.

Does this send my files or file names anywhere?

Section titled “Does this send my files or file names anywhere?”

No. The rule engine runs completely local and offline; the agent issues commands on your machine, and no cloud upload of your data takes place.