Rule reference
Every rule below is an action with the Watch the folder trigger, attached to a folder in a template. This page covers what each one does to a file and which settings it has.
| Rule | What it does to the file |
|---|---|
| Rename | Gives it a new name from a pattern |
| Move Into | Files it into a subfolder |
| Sort by Kind | Files it by what kind of file it is |
| Convert Image | Re-encodes it as JPEG, PNG or HEIC |
| Resize | Caps its longest edge in pixels |
| Strip Metadata | Removes GPS, IPTC and identifying EXIF |
| Skip Duplicates | Moves aside or deletes an identical copy |
| Finder Tag | Adds a Finder tag |
| Run Command | Hands it to a shell command |
A folder can carry as many rules as it needs. Each has its own Which files list, and each acts on the file as the previous rule left it.
Rules run in the order they are attached. A rename followed by a move files the file under its
new name. A rule that only matches png will not match a file an earlier rule has converted to
JPEG, so put the narrow matches before the rules that change the extension.

Rename
Name Pattern is a file name, not a path. The file keeps its extension, and anything the pattern does not recognise is left as it is rather than emptied out. The field previews the result as you type, using stand-in values.
A pattern can use:
- The folder's own placeholders, as they were resolved at deploy:
{{project_name}},{{client_name}}, and so on. {{original_name}}, the file's own name without its extension.{{counter}}, or{{counter:3}}for 001, 002, 003. The number belongs to the folder and the pattern rather than to how many files are in the folder, so it carries on climbing across launches and after earlier files have been moved away.{{captured}}, the photo's own EXIF capture date, falling back to the file's dates. Also{{file_date}}. Both take a format of their own:{{captured:yyyy-MM}}.- Transforms, such as
{{client_name:kebab}}. These work everywhere placeholders do, not only here. See the Placeholder reference.
Slashes and colons in the result become hyphens, so a stray placeholder cannot move the file somewhere else. If the pattern produces the name the file already has, nothing happens.
If that name is taken decides the rest. Add a number appends -2, -3 and so on until it
finds a free name. Leave it alone leaves the file exactly where it is.
Move Into
Subfolder names a folder inside the watched folder, created if it is not there yet.
Placeholders work in the name: {{date}} files by day, {{client_name}}/{{date}} two levels deep.
The result can only ever go downwards. A pattern that resolves to .. or to an absolute path is
trimmed back, so nothing lands outside the folder being watched.
A file already sitting in the destination is left where it is, and a name clash there gets a number.
Sort by Kind
Files the file into Images, Video, Audio, Documents, Archives or Other, creating those folders as they are needed. There is nothing to configure.
The choice comes from the system's own type tree rather than a list of extensions, so a .heic, a
.raw and a .webp all count as images without Prefab having to know each one, and PDFs, text,
spreadsheets and presentations all count as documents.
Convert Image
Convert To picks JPEG, PNG or HEIC. Quality appears for the formats that use it, so not for PNG. A file already in the chosen format is left alone.
The new file takes the original's name with the new extension, and the original's metadata is carried across rather than dropped. The original file itself does not stay in the folder.
Keep the original stores that untouched original inside Prefab rather than beside the file, so the folder does not fill up with two of everything. That copy is what Undo Last Change uses.
Resize
Longest Edge caps the longer side at a number of pixels, keeping the file's format and its proportions. Images already smaller than that are left exactly as they are, not re-encoded and not touched at all, so a folder of mixed sizes only loses quality where it actually needs shrinking.
It has the same Keep the original switch as Convert Image, and here that switch is the difference between a change you can undo and one you cannot.
Strip Metadata
Rewrites the image without the parts that say who, where or when: GPS coordinates, IPTC records, and the identifying EXIF and TIFF fields - capture dates, camera make and model, lens, body serial number, artist and copyright. Orientation is kept, because that is how the image is read rather than anything about its origin.
An image with nothing identifying left in it is not rewritten again, so the rule settles instead of re-encoding the same file on every pass. Keep the original works as it does above.
Skip Duplicates
Compares the arriving file with the files already in the watched folder byte for byte, not by name. Sizes are compared first and a checksum only when two files match on size, so nothing large is read through unless something already looks identical. Very large files, of about a gigabyte or more, are not compared at all.
When a file is already here chooses what happens to the newcomer:
- Move it aside puts it in a
_Duplicatessubfolder, where you can look through it and clear it out by hand. That folder is never searched for duplicates itself. - Delete it removes it, keeping a copy inside Prefab first so the deletion can still be undone.
Once a file has been dealt with as a duplicate, the rules after this one do not run on it.
Finder Tag
A tag is a thing macOS puts on a file, and Windows has nothing that answers to it. A rule of this kind still edits and travels, so a folder set up here tags its files when the rules run on a Mac. On Windows the rule is skipped and the file goes on to the next one.
Tag offers the Finder tags Prefab knows you have, so a near miss cannot leave you with a second, unrelated tag. Typing a name Finder has never seen offers to create it, with a colour of your choosing.
The tag is added alongside whatever tags the file already carries rather than replacing them, and a file that already has a tag of that name is left alone.
One rule adds one tag. Add a second rule for a second tag.
Run Command
Shell Command hands the file to a command of your own, the escape hatch for anything Prefab does not do itself.
{{file}}is the file's full path. Quote it: paths contain spaces.{{file_name}}is the name on its own, and{{folder}}the path of the folder it is in.- The folder's own placeholders work here as well.
The command runs in the folder the file is in, with your normal shell environment. It needs terminal commands switched on and the shell runner installed on this Mac, and it stops if it overruns its Timeout. See Terminal commands.
A command has already done whatever it does by the time Prefab hears about it. Undo Last Change reverses everything else in the batch and reports this entry as one it could not put back, rather than pretending otherwise. Test a command on copies before attaching it to a folder that matters.
What undo can put back
Every other rule is reversible, with one condition attached to the image rules.
- Renaming and moving are undone by moving the file back, unless it has been moved or deleted since.
- Convert Image, Resize and Strip Metadata are undone from the copy Prefab kept, so leave Keep the original switched on for anything you might want back. With it off, a resize or a metadata strip is made in place and cannot be undone at all. The editor says as much beside the switch.
- A duplicate that was deleted comes back from the copy kept when it was removed.
- A Finder tag is removed again, restoring the file's tags exactly as they were.
See Managing and undoing for how undo is offered.