Rules & automatic organization
Describe where a kind of file belongs, once, and Picketdesk files it there from then on — on your command, on a schedule, or the moment it lands on the desktop.
Anatomy of a rule
A rule combines:
- Extensions — a comma list; empty = any, provided Name contains is filled. A rule with neither criterion never matches, whatever its age or size gates say.
- Name contains — optional substring.
- Older than N days — optional (applies during sweeps only).
- At least N MB — optional (sweeps only).
- Because those two are sweep criteria, a gated rule never fires on arrival. Save one while neither Auto-apply nor a Scheduled sweep is on and Picketdesk says so, and names the three ways to run it — it never arms a sweep for you.
- → Target picket — picked from a dropdown of your regular pickets; a target that no longer exists shows as “(not found)” and the rule is skipped. Renaming a picket takes its rules with it: every rule that named the old title is re-pointed at the new one, so a rename never quietly stops a filter from filing. Where two pickets share a title, only the one the rules were actually filing into — the first — takes them along; and if the new name is one an older picket already answers to, the rules follow this picket by its internal id instead, so they cannot drift onto the picket that owns the name. Merging a picket hands its rules on the same way: after Merge into ▸, every rule that was filing into the merged picket, by title or by id, files into the picket it was merged into, so the next organize does not recreate the merged picket and move its files back out.
How rules behave:
- The first matching enabled rule wins; targets that don't exist are skipped (sweeps can create them on demand).
- Enabling or creating a rule imports matching unclaimed desktop files immediately, and new files are routed on arrival.
- A user gesture beats any filter — and the newest gesture wins. Items you dragged out of a picket are remembered as deliberately free, and nothing running on its own re-claims them: not a rescan, not Organize desktop now, not any rule that already existed. Creating (or re-enabling) a rule is itself a gesture, though, and it is the newer one: at that moment the new rule claims matching freed items, once — a toast names the count, and Ctrl+Z sets them free again at the exact spots they held. So a PDF you freed yesterday is picked up by the “all PDFs” rule you create today, while the same PDF freed again tomorrow stays put — the drag is the newer gesture now. You can also hand an item back yourself: drag it into a picket, and filters govern it normally from then on.
- Rules never target portals, smart pickets, or action zones — items must land somewhere they are visible.
- Rules are written by Save. The Save row stays pinned to the foot of the Settings window, and an Unsaved changes pill appears beside it the moment you edit a rule, an ignore list, an extra root, a time page or a toggle. Sections marked Applies immediately — Pages, Action zones, Virtual-desktop bindings, Time machine — need no Save. Closing the window with unsaved edits asks first rather than dropping them: Save and close, Discard and close or Cancel. Save stays greyed out until the window has read your stored settings, and while a save is still being written or its stored values are being refreshed after a partial refusal. Cancel in that question also cancels a pending Save and close: the save can finish, but the window stays open. An edit made while a save is being written keeps it open too, with the close question still up to ask about that edit, and survives a partial refusal; fields you have not edited again follow their stored values. A successful Save writes the settings before arranging existing files under new rules in the background; Save and close does not wait for that scan. Pickets refresh when it finishes. If a drag, delete or move interrupts the scan, it tries again a moment later. A storage failure keeps the window open with your edits and an explanation.
Example rule set:
| Rule | Effect |
|---|---|
png, jpg + name contains screenshot → Screenshots |
Every new screenshot files itself. |
pdf, docx, xlsx → Documents |
Office files head to a Documents picket. |
zip, iso, dmg, older than 90 days → Archive |
A sweep tucks stale files away. Age and size are extra gates, not criteria of their own — a rule still needs extensions or a name fragment, or it matches nothing. |
mp4, mkv, at least 500 MB → Big videos |
Heavy files become easy to spot and clean up. |
Running the rules
- Organize desktop now (tray or picket menu): applies rules to everything — picketed and unclaimed items alike (deliberately freed icons stay untouched) — creating missing target pickets on demand, and reports via toast. A missing target is created for any rule shape, and only when that rule actually has something to move, so a rule gated on age or size never leaves an empty picket behind. A picket is created from a target that is a name; a rule that follows one specific picket — a quick rule from an item menu, or one carried over by a rename into a name another picket already had — is skipped once that picket is gone, since there is no name left to bring it back under. Files in a private picket are never moved by a sweep and never listed in its preview: a rule would otherwise carry them out from behind the padlock into an ordinary picket anyone can read.
- Preview organize (dry run)… (picket menu): shows what would move where, including new destination pickets. Apply checks the reviewed plan before changing anything. If the result has changed, the dialog shows the updated preview for another Apply, or says that nothing is left to apply when the files already match the rules; Cancel dismisses it while idle. During Apply, Escape, Cancel and a click outside cannot close it. A failed request keeps the dialog open for retry, and asking for another preview while it is open shows the new one there.
- Auto-apply every N hours (Settings, 0 = off): a scheduled tidy, the first one N hours after Picketdesk starts; safe mode skips it. Like the day-and-hour schedule below it reports via toast, and raises a Windows notification only on a pass that actually moved something — never one to say it found nothing to do.
- Scheduled sweeps (Settings): “Fridays at 17:00”-style organize runs, alongside the interval option: every day or one day of the week, at a whole hour of local time. A slot that passes in safe mode is skipped, not made up later. If the machine was asleep at that hour the sweep runs once when it wakes, later the same day, instead of being lost until next week. Merely starting Picketdesk after the slot has passed sweeps nothing, and neither does switching the schedule on after it — that arms it for next time.
- Undo: one step reverses a whole sweep — only
actually-moved items are recorded, and items a sweep adopted from the
unclaimed pool are released again. A sweep you started from the tray,
Settings or a schedule leaves nothing focused, so reach it with
tray → Undo last action or the palette's
undo; Ctrl+Z is the same stack from inside a picket window or Settings.
Quick ways to make rules
- Quick rule: right-click any item → “Always move .ext files to this picket”. Offered on regular pickets only — a rule aimed at a portal, smart picket or action zone could never fire, so it is refused rather than created as a standing rule that silently does nothing.
- Rule recorder: after you manually move three files of the same type into the same picket — by drag, the item menu, the Ctrl+M mover or Inbox triage (a palette move does not count) — the picket shows a one-click banner: “Always move .png files to Screenshots? Yes / No”. Yes creates the rule; No silences that extension for the session. Grid shortcuts remain usable while the banner is visible. Escape dismisses it without clearing the selection, with active editors and dialogs keeping priority over the banner.
- Stale-file nudge: if 10+ files in your pickets sit untouched for 90+ days, a toast says so half a minute after launch and points at Settings → Auto-sorting rules — asking for the file types and an “older than 90”, because an age on its own is not a criterion and a rule carrying nothing else never matches. It then names Organize desktop now: an age gate is a sweep criterion, so saving the rule and closing Settings moves nothing until Auto-apply, a scheduled sweep or that tray entry runs. It does not point at Suggest, which only proposes extension categories. It speaks only when it has something new to say: ignore it and that pile stays quiet for good, and only a materially bigger one (25, 50, 100…) says it again. While you keep an “older than N days” rule switched on, it says nothing at all.
Suggestions — analyzed locally
- Suggest rules from my desktop (Settings): local analysis proposes category pickets with live counts; one click creates the pickets + rules and organizes. It counts the whole desktop — loose files as well as ones already in a picket, so it works before you have made your first picket — minus anything you deliberately dragged out of a picket. The button acts once per press and greys out until the rules are in; suggestions whose rules already exist add nothing, so applying the same ones twice never doubles a rule or sorts your desktop a second time. Save waits until the applied rules have been read back; if that fails, Retry refresh beside Save reads them again while keeping your unsaved edits, without applying the suggestions twice. Older refresh replies cannot replace newer settings or a completed save.
- AI suggest (local): the same via an
Ollama model on localhost, if one is
running. Nothing leaves the machine. It uses the first model Ollama
lists that can generate text and skips embedding-only ones, so the
embedding model you pulled last does not become the one every
suggestion is asked of. It also skips Ollama cloud models (a
-cloudor:cloudtag), which would send your file names to ollama.com; with only cloud models pulled it asks you to pull a local one such asllama3. If Ollama refuses, its own message is shown rather than a parse error. - AI filing (Settings): suggests which picket each loose file belongs to by meaning; accept per file or all at once. Loose means unclaimed desktop items first, then whatever is in your first picket that is not private, at most 30 files per Suggest filing. Destinations are regular pickets. File it and File all remove only rows successfully filed; refused rows stay with a reason for retry or Skip. File all groups work by destination, with one undo step per changed batch. A private picket's files are never offered, so they are neither listed nor sent to the model.
- What changed (Settings): lists desktop files that appeared, vanished or grew (by more than 10 MB) since a stored baseline. The first Show changes stores it, and Reset baseline stores a new one. A baseline that cannot be read, is damaged, or cannot be saved is said in place of the list. It is never reported as a new baseline, and an unreadable or damaged one is left as it is until Reset baseline replaces it.
Self-cleaning pickets
Right-click a regular picket → Automation… →
Enable self-clean. Choose 1–3,650 days and
Recycle Bin or Folder, review the
summary, then Save automation. Edits are not applied
until saved. A sweep runs every 10 minutes in the primary desktop-controlling
instance. Safe mode and isolated --profile instances skip
self-clean, including its membership-age updates, and so does a
read-only session (the one the warning box at launch describes): the
layout it shows is not your saved one. Every expired file is logged (source → destination) to
picket.log.
An item counts as old only when all three of its clocks are past N days: its last-modified time, its created time (a fresh copy of an old file is a new file — Explorer's copy keeps the old modified date), and the time the sweep first saw it in this picket (a same-drive move keeps both file dates, so only the membership age catches “moved an old file in yesterday”). A file you just dropped in is never swept on the first pass; items that predate this rule age from the first sweep after updating.
With your configuration kept in another folder (Settings → Move configuration to another folder…), a self-clean policy runs only once this PC has approved exactly it — its days and its destination, the Recycle Bin included — because anyone who can write that folder could otherwise set one. A policy you save here is approved as you save it, and moving the configuration approves the ones you already had. One that arrived through the folder is skipped (nothing is moved or recycled) and a notification says so once per launch: Automation… → Save automation on that picket allows it. If your configuration was already in another folder before this version, your own policies count as having arrived that way too: save each one once on each PC.
It only ever moves files that sit directly on your desktop; folders are skipped. A collection item that lives in one of your own folders — including a folder sitting on the desktop — is shown by the picket but never recycled or archived by the timer.
Every sweep is undoable. The toast names the first file
and where it went — “Self-clean: “report.pdf” and 2 more → D:\Archive
— tray → Undo last action” — and that one tray entry takes the whole
sweep back. (Ctrl+Z in a picket does too, but the
sweep runs on a timer and leaves no picket focused; pressed on the
desktop, Ctrl+Z goes to Explorer and undoes your
own last file operation instead.) Archived files are renamed home and re-filed into the picket
they left, recycled ones come back from the Recycle Bin. A file whose
desktop name has been taken by something else since is left where it is
rather than written over it. The undo stack is session-only and 20 steps
deep, so picket.log remains the record for anything older.
Archiving preserves files already at the destination, including one created
during the move. It takes a numbered name such as report (2).pdf,
and undo follows that name. A failed copy never removes a destination it did
not create.
A destination on another drive works (the file is copied, then the
original removed); the desktop itself is refused as a destination. The
destination must be a full folder path on this PC, like
D:\Archive: a folder name alone, a
%USERPROFILE%\… path, C:Archive, a
\\server\share path or a mapped network drive is refused
when you save, because most of those would have landed inside
Picketdesk's own program folder. Quotes from Explorer's “Copy as path”
are removed, and the panel shows the path as stored. One an older
version saved is refused by the sweep too, with the items left in the
picket and a toast saying so once. If an
item can't be moved — the destination folder can't be created, the file
is held open, or the destination was inside a Desktop folder that
OneDrive's folder backup has since moved and is no longer there (it is
not re-created in the old place; the next launch re-links it once it has
arrived, see Recovery) — it stays in its
picket, hidden as before: picket.log
names the reason, a toast says so once, and that item is left alone until
the destination changes or the next start. The sweep never asks a question:
recycling on the timer ignores Explorer's “display delete confirmation
dialog” preference. It never deletes anything permanently
either: when Windows would delete a file for good rather than recycle it
(that drive has no Recycle Bin, the bin is off for it, or the file is
bigger than the bin takes), the question Windows asks is answered No
before it appears, the file stays in its picket, hidden, and a toast
says why once — that item is left alone until the next start. Move such
a file yourself, or give the picket a Folder
destination.
Quick capture
Ctrl+Shift+N opens a note box anywhere:
jot, then Ctrl+Enter saves it to your desktop as a
Markdown file. Esc (or Alt+F4) closes the box and keeps what you typed for
the next Ctrl+Shift+N; only a save empties it. Your rules route it like any other
new file — a md → “Notes” rule gives you an instant inbox.
Notes are named Note YYYY-MM-DD HH-MM.md on your local
clock; a second one in the same minute becomes
Note … (2).md, preserving existing files even if another app
creates the name during capture. If the desktop cannot be written, the box comes
back with your text, a retry message and a toast; clearing the box
discards the draft and the message with it. While a save is
pending, reopening shows the draft read-only with Saving…;
another Ctrl+Enter cannot submit it twice.
Driving Picketdesk from launchers & scripts
While Picketdesk is running, a second picket-app.exe with a
flag forwards the action to the live instance and exits — the standard
channel for PowerToys Run, AutoHotkey, Stream Deck, or Task Scheduler:
| Flag | Does |
|---|---|
--toggle | Hide / show all pickets. |
--peek | Toggle peek-over (pickets above every window). |
--page "Gaming" | Switch to a saved page (fuzzy match, snapshot first). |
--palette "pin Work" | Run one command-palette verb; the result shows as a toast. |
--search "invoice -t pdf" | Open the search overlay pre-filled. |
--triage | Open the overlay straight into Inbox triage. |
--new-picket | Create an empty picket. |
The set is closed on purpose: no launcher flag accepts a file path or
a command line, and none deletes anything. What a stray process
spawning Picketdesk can reach is what you can do by hand:
--page and --palette move desktop items into
and between pickets (filing an item hides its desktop icon, as always), and
loading a page opens the programs that page lists — at once only if
this PC approved them for that page, otherwise after a box asks you.
Each of those is undone the usual way (Ctrl+Z, the
snapshot taken before a page loads). A second
launch with no flags simply re-shows your pickets, as it always has —
or, when there is no picket to show, opens the welcome box that offers
to create one.