# Add metadata

When you create a **NEW RULE**, one of the fields that you have to fill in is **Metadata \* / Add Metadata** to define the metadata values to filter the files to which the rule will be applied. 🚀 A maximum of 512 characters is supported. This number includes all the names and values of all metadata configured. For example, in the following figure, the system will sum up all these characters: originalFileName+ritorno.txt\*+vfsVirtualPath+VFS\_MASTERIT:/MIPH0/Input.

<figure><img src="/files/pZC6aPXGYZFznK4h0mQ8" alt="" width="494"><figcaption></figcaption></figure>

When you define filters, these are in AND. So, the more filters you define, the more selective the rule will be.

To add metadata, follow these steps:

1. Click the **Add Metadata** button to open the **Add new Metadata** window.
2. In the **Select a Metadata type** field, choose among these metadata types:\
   a) Filebox Spazio 2 Files System Metadata\
   b) Filebox Fileset Files System Metadata\
   c) Generic Metadata

<figure><img src="/files/5ZHszlXJB1lghRh0yPoF" alt="" width="337"><figcaption></figcaption></figure>

#### Filebox Spazio 2 Files System Metadata

For the **Filebox Spazio 2 Files System Metadata** type, select the Metadata among those listed.

<figure><img src="/files/I7meNC65VtvPUdnWKdmV" alt="" width="322"><figcaption></figcaption></figure>

#### Filebox Fileset Files System Metadata

For the **Filebox Fileset Files System Metadata** type, select the Metadata among those listed.

<figure><img src="/files/ZtXHymW2CatgYSWs1ple" alt="" width="307"><figcaption></figcaption></figure>

When configuring the **Original FileName** metadata, you can use the \* and ? wildcard characters. E.g., originalFileName=test\*.txt.

The **vfsVirtualPath** metadata must be configured as a Virtual path. See the following picture:

<figure><img src="/files/hDjygwZO0aOHTh6ttVC9" alt="" width="494"><figcaption></figcaption></figure>

For the **fileSize** metadata, configure the operator and the metadata value in bytes.

#### Generic Metadata

For the **Generic Metadata** type, enter the metadata name and values as needed.


---

# 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/file-routing/create-a-rule/add-metadata.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.
