Placement rules for received files
Where and under which name Filarr files a file received by the gate: the folder, the requested path, the rules, renaming, duplicates, the fallback.
En esta página
Secciones de la ayuda
A file received by the gate is filed by your app, never by the gate nor by Filarr. The rules are set in Settings → API access → Received files, on the access that receives files: Placement rules.
Where the rules live
In your profile's encrypted keychain: the same on all your devices. They replace the folder set device by device for a drop box. The first time, Filarr takes over the folder you had chosen on this device; if another device had chosen another one, the first one saved wins, and the other device tells you once: "The folder of the box "API inbox" is now "Accounting", set on another device."
File automatically on this device stays a choice of each device.
The order of decision
- The path requested by the software (
path), if you accept it: it comes before the rules, inside the folder only. - The rules by type, in order: the first one that matches wins; a disabled rule is skipped.
- Everything else: what no rule took goes to the Fallback subfolder ("To sort" by default), where the "To tidy" page suggests a learned place.
With no active rule, and no accepted requested path, the file goes to the folder itself, like an ordinary drop box.
A rule
On screen, a rule has a name, Extensions (.pdf, or .jpg .png .heic) and a Subfolder. A box turns it on or off; Move up and Move down change its rank; + Add a rule creates another one.
Examples:
| name | extensions | subfolder |
|---|---|---|
.pdf | Invoices/{year}/{month} | |
| Images | .jpg .png .heic .webp | Photos/{year} |
| Spreadsheets | .csv .xlsx .ods | Exports |
Twenty rules at most per box. Try shows where an imaginary deposit would go (A deposit arrives, with path (optional)), and why.
The rule format also knows the file's type, the tags sent by the software and the name of the app key that dropped the file, but the screen does not offer them yet.
Name and path templates
Rename as gives the name of the filed file. A name or a subfolder can hold tokens, replaced when filing. You can write them in English or in French: Filarr shows them in your language.
| token | in French | becomes |
|---|---|---|
{name} | {nom} | the original name, without extension |
{ext} | {ext} | the extension, with its dot |
{date} | {date} | the deposit's date, 2026-10-09 |
{year} {month} {day} | {année} {mois} {jour} | 2026, 10, 09 |
{source} | {source} | the app key (erp); link for a deposit through a link, email for one by e-mail |
{tag} | {étiquette} | the first tag, or nothing |
{n} | {n} | the deposit's number in the month, on four digits (0041) |
Example: the template {date}_{source}_{name}{ext} files invoice-2291.pdf, dropped by the erp key on 9 October 2026, under the name 2026-10-09_erp_invoice-2291.pdf.
Dates are counted in the time zone chosen when the rules were created: two devices in different time zones file in the same place.
Each piece of a path is cleaned like a file name: forbidden characters (< > : " | ? *) and trailing spaces and dots are removed, a reserved Windows name gets a _ in front, and 120 characters at most. An empty piece disappears; eight pieces at most. . and .. are refused as soon as the rule is saved.
The path requested by the software
Tick Accept the path asked by the caller (path), inside this folder only for path to be read. It is accepted if it stays in the folder: relative, without .., without / or \ at the start, without a drive letter (C:), without an empty piece, eight pieces and 200 characters at most.
A path that leaves the folder is refused: the file goes to the fallback, and the journal says "path refused, to sort". Renaming applies in both cases.
Duplicates
A duplicate is a file with the same fingerprint as a file already filed in the same place. The fingerprint is computed by the gate, encrypted with the file, then checked by your app after decryption.
- Ignore (the default for a new box): the file is not filed a second time, it counts as filed, and the journal says "duplicate left".
- Keep both (the default for a box that already existed): filed next to it, with "(1)".
- New version: it becomes a new version of the existing file.
On the web, only files already in the cache can be compared; otherwise the file is filed as if it were not a duplicate.
A name already taken, without being a duplicate, gets "(1)".
Click Save the rules.