# File Arrival Activation

You can have a named-paths group run automatically when a new file arrives and is registered as named-file version. This functionality is essentially the same as:

```python
csvpaths = CsvPaths()
csvpaths.file_manager.add_named_file(name="shipping", path="/my/path/to/my/file.csv")
run_ref = csvpaths.collect_paths(filename="shipping", pathsname="my_shipping_group")
```

It is also essentially the same as calling FlightPath Server's `/`[`register_and_run`](https://www.flightpathdata.com/swagger/dist/#/register/register_and_run_csvpath_register_and_run_post) endpoint.

Even though the functionality is not hard to replicate using plain Python or a JSON REST API endpoint, it still has value. Activating a named-paths group on file arrival is an automated, no-code operation. It is based on configuration that lives with the named-file. And it acts as a default behaviour that can consistently augment a workflow, even when it is not the main event.

Setting up the file arrival activation is equally straightforward. You add it to the named-file's definition.json file. It looks like:&#x20;

```json
{
  "on_arrival": {
    "named_paths_group": "shipping",
    "run_method": "collect_paths"
  }
}
```

It's that simple. Now when a. new CSV, Excel, or JSONL file is registered — in Python, using the API, or in FlightPath Data — our `shipping` named-paths group will run.&#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://www.csvpath.org/topics/how-tos/file-arrival-activation.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.
