# Files to result

## ![](/files/VDSkI1CqyJp1rfzQbBlx) Files to result

### Description <a href="#description" id="description"></a>

The Files To Result transform allows you to set filenames in the internal result files of a pipeline.

Subsequent workflow actions can then use this information as it routes the list of files to the result files stream e.g. by using the Get files from result transform or some workflow actions that can process on the list of result files.

For example, the Mail workflow action can use this list of files to attach to a mail, so perhaps you don’t want all files sent, but only a certain selection.

For this, you can create a pipeline that sets exactly those files you want to attach.

{% hint style="danger" %}
Warning: The Files To Result is available for historical reasons. Check the [Best Practices](/data-shaper-1.21/knowing-the-data-shaper-designer/index-3.md) for better ways to build loops in your Hop pipelines.
{% endhint %}

| Hop Engine | <sup>✓</sup> |
| ---------- | ------------ |
| Spark      | X            |
| Flink      | X            |
| Dataflow   | X            |

### Options

| Option          | Description                                                         |
| --------------- | ------------------------------------------------------------------- |
| Transform name  | The name of this transform as it appears in the pipeline workspace. |
| Filename field  | Field that contains the filenames of the files to copy.             |
| Type of file to | Select the type of file to set in results.                          |


---

# 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-shaper-1.21/knowing-the-data-shaper-designer/pipelines/transforms/filestoresult.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.
