Guide New Reviewed for 1.1.11 · 4 min read

Create a folder rule

Write a rule as a sentence, such as "If Images, then move to Images", and let a folder keep itself tidy.

On this page 7 sections

What you’ll accomplish

  • Set up a rule that sorts, renames, tags or cleans a folder for you
  • See exactly which files the rule would take before you save it
  • Start from a sample rule or from a sort you just did

A folder rule reads like a sentence: In this folder, If these conditions are true, Then do this. DockDuck checks the folder’s rules when you open it, and with DockDuck closed too when the rules allow it. The first time a rule runs, it shows you what it’s about to do and waits for you.

Before you start

Rules work on folders on your Mac and on external drives. They never run on servers, iCloud Drive, Google Drive, Box, Sync, Recents, the Trash, tags or pinned items, or while a transfer is landing in the folder.

Create a rule

  1. Open the folder

    Go to the folder you want to keep tidy, such as Downloads.

  2. Choose Organize This Folder

    Control-click an empty spot in the folder and choose Organize This Folder…. You can also click the gear next to the sort menu at the top of the folder.

    Result: The Organize sheet opens.
  3. Open the Rules tab and click New rule

    For a folder’s first rule, DockDuck offers samples. Pick one to start from it, or click Start blank.

    The Rules tab of the Organize sheet for Downloads, with its rules and New ruleThe Rules tab of the Organize sheet for Downloads, with its rules and New rule
  4. Choose where the rule looks

    Next to In, keep Only in the folder, or choose In … and all its subfolders, or Only in the subfolder… and type its name.

  5. Add the conditions

    Next to If, click a condition to change it, or click + to add one. A file must meet every condition. See Conditions & actions.

  6. Choose the action

    Next to Then, choose what happens to the files, such as Move to a subfolder, Rename or Add a tag, and fill in its value.

  7. Check the preview line

    Click See to list exactly which files the rule would take today. Nothing moves yet.

    Result: The line at the bottom says, for example, Today it would move 12 items.
  8. Click Save

    The rule is added to the folder’s list.

The rule editor with the In, If and Then rows filled in and the preview line at the bottomThe rule editor with the In, If and Then rows filled in and the preview line at the bottom

The next time the folder opens, the rule shows a preview and waits for you to confirm. See Preview, manage & undo rules.

Options

OptionWhat it does
Notify me when it finishesA notification names the folder and what the rule did.
Let the rules below see these files tooOtherwise the first rule that matches keeps the file.
Also when DockDuck opensRuns the rule when you open DockDuck, not only when the folder opens.
Run without askingAppears after the rule has run once with a preview. Every pass is still one ⌘Z.

Samples

SampleThe rule
Rename photos by dateIf Images, then rename to the date added and a number
Sort by kindIf Documents, then move to Documents
Clean up the oldIf added more than 30 days ago, then move to the Trash
Extract what you downloadIf Archives, then extract here
Take photos to PhotosIf Images and the name contains “IMG_”, then import to Photos
The Organize sheet for Downloads, grouping files by kind into folders, with Keep it this way at the bottomThe Organize sheet for Downloads, grouping files by kind into folders, with Keep it this way at the bottom

Other ways to start a rule

  • From a sort. In the Organize tab, after you choose how to sort, the Keep it this way card adds one rule per folder, so new files are sorted on their own. Click Add rules.
  • From a suggestion. When a folder has files nobody changed in months, the bottom of the window may say “This folder can tidy itself”. Click See how to open a rule that moves files modified more than 90 days ago to an Archive subfolder. Click No, thanks and DockDuck doesn’t suggest it again for that folder.
  • From another folder or Mac. Import a .ddrules file. See Preview, manage & undo rules.

Tips

  • Rules run from top to bottom. Drag a rule in the list to change the order.
  • When nothing in the folder meets every condition, the editor names the condition that blocks the rest. Click Remove it to drop it.
  • Folders your rules move things into are never checked by those rules.
  • Hidden files and cloud files that aren’t downloaded are never touched.

If something goes wrong

ProblemWhat to do
The preview says “Finish the rule to see what it would take”Fill in every value, such as the subfolder name, the folder to move to or the text to look for. A subfolder name can’t contain /.
”Today it would touch nothing · the rule will wait”No file matches today. The rule runs when one does.
Organize This Folder… isn’t offeredThe folder is in iCloud Drive or another cloud drive, or it’s a place such as Recents. Rules don’t run there.
Still stuck? Write to us with what you tried. We read every message.