> AI agents: this is one page from Mammoth Analytics documentation. The index of all pages as Markdown is https://mammoth.io/docs/llms.txt. Append `.md` to any docs URL, or send `Accept: text/markdown`, to get Markdown.

# Send files from one folder to several datasets

> Route files in one Mammoth watched folder to different datasets with name-pattern rules, set which rule wins, and read the folder's automations box.
>
> Applies to: Roles: Reorder rules is not shown to people with view-only access. Where: Data Library › watched folder › automations box › Reorder rules

A folder can have several [Data Consolidation](https://mammoth.io/docs/learn/automate/consolidate/) automations, each a rule with its own name pattern and destination. A file goes by the first rule it matches, and to that rule's destination only. You see and reorder a folder's rules from the automations box in its toolbar in the Data Library.

## Which rule takes a file

The order is:

1. The folder's own rules, in the order you set (a new rule goes last).
2. Rules from parent folders whose automation has **Include subfolders** on, closest parent first. These show "from" and the parent folder's name in the list.

### See the folder's other rules while you set one up

If other Data Consolidation automations already watch the folder, the **Select source folder** step shows a note such as **This folder already has 2 rules**, listing each rule's pattern and automation name: "A file goes by the first rule it matches. A new rule goes last; reorder them from the folder." If recent files would match your new rule but an earlier rule takes them, it says so, for example "3 of this folder's recent files also match this rule, and an earlier rule takes them." Narrow your pattern, or [reorder the rules](#reorder-a-folders-rules) after you save.

## Read the folder's automations box

A watched folder's toolbar shows a box for each automation on it, after **New folder**. A rule's box reads like **Files go into Sales**, or **\*_sales.csv into Sales** when it has a name pattern. A suspended automation shows **Paused**. Click a box to open its card:

| Field | What it shows |
| --- | --- |
| Status | **Active** or **Paused** |
| **Takes** | Which files the rule takes, for example "names ending “_sales.csv” · includes subfolders", or "all files added here" |
| **Goes into** | The destination dataset and where it lives, with a link to its folder |
| **Last file** | When the last file arrived, or "no files yet" |

The card ends with: "Once a file is added it leaves this folder. A file that can't be added stays here, and we'll tell you why." Click **View automation** (**View** where space is short) to open the automation in the Automations tab. Its **History** lists every file it took in, how it arrived (**Uploaded file**, **Collected file**, **Moved in** or **Added on request**) and how it went, for example "2 of 3 added". A [File Collection](https://mammoth.io/docs/learn/automate/collect-files/) that brings files into the folder has its own box with **Brings in** and **Last run**.

With two or more automations, a list box (for example **2 automations**) opens **This folder's automations**. With more than two, only the first keeps its own box and the rest fold into the list box, which then reads, for example, **+2 more**. The list shows the rules in order (under "Files added here go by the first rule they match"), then **Bringing files in**. The last line says what happens to the rest: "Anything no rule takes stays here", or "Nothing stays here: rule 2 takes every file the ones above it don't" when a rule takes all files.



In the Data Library list, a watched folder shows **Watched** and which dataset it feeds ("feeds Sales" or "feeds 2 datasets"), and counts files that couldn't be added, for example "3 not added". A destination dataset shows "Fed by" and the folder's name.

## Reorder a folder's rules

1. Open the watched folder and click the list box (for example **2 automations**) to open **This folder's automations**.
2. Click **Reorder rules**.
3. Use **Move up** and **Move down** on the folder's own rules. Rules from parent folders can't be moved here.
4. Click **Save order**, then confirm in **Change the order of this folder's rules?**: "From now on, a file matching more than one rule goes by the first of them in this order. Files already added stay where they are."

You see "Rule order saved", or "Couldn't save the order. Nothing changed." if it failed. **Reorder rules** is not shown to people with view-only access, or when the folder has only one rule of its own.

## Check where uploaded files will go

When you upload files into a watched folder from **Add data**, the upload shows **Where these files go** while it checks ("Checking where these files go…"). Each file shows its destination (for example "→ Sales"), or **Stays here** with "No rule takes it, so it becomes its own dataset here." A file matching two rules says which wins, for example "Also matches Returns, but Sales comes first." The note reads "Added files leave this folder once they're in their dataset."

## Troubleshooting

| Symptom | Cause | Fix |
| --- | --- | --- |
| A file stayed in the folder with no chip | No rule took it: its name matches no pattern, or the automation is suspended | Check the rules in the folder's automations box. Make sure the automation is **Active** and the file name matches |
| A file went to the wrong dataset | It matched more than one rule, and an earlier rule took it | Narrow the earlier rule's pattern, or [reorder the rules](#reorder-a-folders-rules). Files already added stay where they are |

## Related

- [Combine files dropped in a folder into one dataset](https://mammoth.io/docs/learn/automate/consolidate/): set up each rule.
- [Fix files a watched folder didn't add](https://mammoth.io/docs/learn/automate/watched-folder-files/): files a rule took but couldn't add.
- [Folders and folder rules](https://mammoth.io/docs/learn/organise/folders/): create folders.
- [Upload files](https://mammoth.io/docs/learn/get-data-in/upload-files/): the upload dialog.

---
Source: https://mammoth.io/docs/learn/automate/folder-rules.md · Updated: 2026-11-08
