# Example

### Automatically detect and ingest incoming files

Imagine a company receiving files from an external application that writes data directly to a file system folder. Each time a new file is created in that folder, it must be immediately detected and taken in charge by Data Mover Smart so that it can be processed, transferred, or managed.

Manually checking the folder or relying on batch jobs would introduce delays and increase the risk of missing files.

You can configure a **File Event Listener** to automate the detection of file arrivals.&#x20;

Once the File Event Listener is running, every time a new file is added to the monitored folder, the system automatically detects the event and acquires the file, which becomes immediately available within Data Mover Smart, where it can be processed without any manual intervention.

To configure the **File Event Listener** for this scenario, follow these steps:

* **Listening folder:**
  * **Remote** connection to another Data Mover Smart, via **SFTP**
  * **Remote path:** /inbox

<figure><img src="/files/CZxDRgv8VrYBqBiJ9xo2" alt="" width="517"><figcaption></figcaption></figure>

* **Trigger:**&#x20;
  * **New file** - A new file arrives in the folder

<figure><img src="/files/vasOxTS8ZgQp8kU8uXIe" alt="" width="367"><figcaption></figcaption></figure>

* **Condition attributes:**
  * **\*.pdf** - Any file with .pdf extension

<figure><img src="/files/OqEkc4UskIxXxhSetMs5" alt="" width="563"><figcaption></figcaption></figure>

* **Actions:**
  * **Rename file** - Rename the file with the current date and time<br>

    <figure><img src="/files/yuK13we3zReQgmpPSM5s" alt=""><figcaption></figcaption></figure>

  * **Move** - Move the file to VFS CustomerData/Invoices/2026 after successful transfer, adding DMS sender attribute.&#x20;

<figure><img src="/files/iLfsJEdCHiHyOAfkegTl" alt="" width="527"><figcaption></figcaption></figure>

Click **Save** to confirm.&#x20;


---

# 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-smart/file-event-listeners/example.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.
