# Como escrever arquivos dentro de pastas

Digamos que você tenha um arquivo `"file.txt"` na pasta `"folder"` disponível no seu pipeline. Para poder escrever esse arquivo dentro de uma pasta, você pode usar um **File Writer** que indique o caminho `"folder/file.txt"`. Dessa forma, você consegue acessar o arquivo `"file.txt"`.

Veja como fazer isso:

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

1. Crie um pipeline e adicione um conector **File Writer**.
2. Abra o formulário de configuração do conector.
3. Defina o parâmetro **File Name** como `"folder/file.txt"`.
4. Defina o parâmetro **Data** como `{{ message.data }}`*.* Note que usamos a expressão em Double Brace&#x73;*:* `{{ message.data }}` para acessar o resultado do último conector. Nesse caso, acessamos `data` com o conteúdo do arquivo a ser escrito.
5. Clique em **Confirmar** para salvar as configurações do conector.
6. Conecte o trigger com o **File Writer**.
7. Execute um teste no pipeline (CTRL + ENTER).

O resultado será apresentado:

```
{
 "fileName": "folder/file.txt",
 "success": true
}
```

* **fileName:** apresenta o caminho completo do arquivo que foi escrito.
* **success:** quando apresenta *true* no resultado, indica que a execução foi bem sucedida.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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.digibee.com/documentation/connectors-and-triggers/pt-br/connectors/files/file-writer/write-files-in-a-folder.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.
