# File Processing Rules tab

## Create a File Processing Rule

The **New File Processing Rule** window allows you to define how incoming or outgoing files should be processed when they match a specified pattern. All required fields must be completed before the rule can be saved.

Once created, File Processing Rules must be [associated with a Virtual Path](/data-mover-1.21/contracts/create-your-first-contract/create-a-connection-contract/virtual-path-rules-tab.md) in the relevant Connection Contract. This association determines which files within that path will trigger the rule.

Fill in these fields:

* **Default File Processing Rule (optional)**: enable this toggle to set the rule as the **default rule** for the Actor. The default rule is applied **to all paths** when selected in a Connection Contract, unless another rule matches a more specific file pattern.
* **File processing rule (\*)**: enter the **name** of the rule. This field is **mandatory**.
* **Description:** optionally enter a description to clarify the context or purpose of the rule.
* **File pattern (\*)**: specify the **file name pattern** to which the rule applies. For example:

  * `*.*` → any file (default)
  * `*.csv` → all CSV files
  * `report_*.xml` → all XML reports beginning with "report\_"

  This field is **mandatory**.

{% hint style="danger" %}
**Important:**\
File Patterns can be used to **filter** which files will trigger the rule.  You may also leave the pattern generic, for example `*.*` , to apply the rule to **all files** within the selected Virtual Path.
{% endhint %}

* **File resources**: select one or more **File Resources** to apply to files that match the pattern.\
  Refer to the [File Resources tab](/data-mover-1.21/actors/configure-an-actor/file-resource-tab.md) section for details on creating and configuring **File Resources**.
* **Virtual boxes**: select one of the available **Virtual Boxes** or create a new one by clicking the **New** option. Refer to the [Virtual Boxes](/data-mover-1.21/contracts/virtual-boxes.md) section for details.&#x20;

Click **SAVE** to create the rule.

The new rule will immediately appear in the list of File Processing Rules associated with the Actor.

## File Processing Rules list

Already configured File Processing Rules are listed on the page with the following details:

* **Modified**: the date and time when the File Processing Rule was last updated. The date is displayed on the first line, and the time on the second line.
* **File Processing Rule**: the name of the File Processing Rule.
* **File pattern**: the file name pattern that triggers the rule (for example: `*.*`, `*.csv`). You can use the **File pattern** field to filter which files the File Processing Rule applies to, or you can leave the pattern generic. When the pattern is generic (for example `*.*`), the File Processing Rule is applied to **every file** within the selected Virtual Path.
* **File resources**: the File Resources associated with the rule. Clicking the icon next to a File Resource name opens its details.
* **Virtual Box**: the Virtual Boxes linked to the rule. When multiple Virtual Boxes are associated, the first two are shown followed by a **+X** indicator, displaying how many additional Virtual Boxes are included.
* **Default**: indicates whether the rule is marked as the default File Processing Rule (**True** or **False**).

Each row also includes the three‑dot menu, which provides options to **edit** or **delete** the File Processing Rule.

Results can be sorted in chronological and reverse chronological order by selecting the **Modified** column header.

### File Processing Rules menu options

The 3‑dot icon next to each File Processing Rule provides the following options:

* **Edit**: opens the File Processing Rule window so you can modify fields.
* **Delete**: permanently deletes the File Processing Rule.

### File Processing Rules filters panel

File Processing Rules can be filtered using the **Filters** panel.&#x20;

In the **Search File Processing Rules** field, enter the full file processing rule name or part of it, then press **Enter** on your keyboard or click **Apply**.

* The search field is **case‑insensitive**.
* You can run a search even by typing a **single character** (letter or number).
* **Wildcard characters are not supported.**&#x20;

You can also filter the list to display **only default File Processing Rules** by enabling the corresponding toggle.

To reset all filters, click **Clear all**.

## Sample use cases for File Processing Rules

To better describe the usage guidelines for File Processing Rules, these are some sample use cases:

**Data Mover receives a file through SFTP and saves it in DATA format** \
File Resource configuration:

* mime remote = text/plain
* charset local = 819
* mime local = text/plain (or null)
* charset local = 819 (or null)

**Data Mover receives and saves a file through PR4 with PGP encrypted**\
File Resource configuration:

* secure remote = NONE
* secure local = PGP

**Data Mover receives an uncompressed file through PR4, with compressed saving in Data Mover** \
File Resource configuration:

* compression type remote = null
* compression type local = SPZIP

**Data Mover receives a compressed file through PR4, with compressed save in Data Mover** \
File Resource configuration:

* compression type remote = SPZIP
* compression type local = SPZIP

**Data Mover has an uncompressed file and sends it compressed through PR4**\
File Resource configuration:

* compression type remote = null
* compression type remote = SPZIP


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.primeur.com/data-mover-1.21/contracts/create-your-first-contract/create-a-connection-contract/file-processing-rules-tab.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
