> For the complete documentation index, see [llms.txt](https://docs.digibee.com/documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.digibee.com/documentation/connectors-and-triggers/pt-br/connectors/files/file-reader/read-files-in-a-folder.md).

# Como ler arquivos dentro de pastas

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

Siga os passos abaixo para saber como fazer isso:

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

1. Crie um pipeline e adicione um conector **File Reader**.
2. Abra o formulário de configuração do conector.
3. Defina o parâmetro **File Name** como `"folder/file.txt"`.
4. Clique em **Confirmar** para salvar as configurações do conector.
5. Conecte o trigger com o **File Reader**.
6. Execute um teste no pipeline (CTRL + ENTER).

O resultado será apresentado:

```json
{
  "data": [
    "my sample content"
  ],
  "fileName": "folder/file.txt",
  "lineCount": 1
}
```

* **data:** vetor com o conteúdo do arquivo lido pelo **File Reader.**
* **fileName:** apresenta o caminho completo do arquivo que foi lido.
* **lineCount:** identifica a quantidade de linhas contidas no arquivo lido pelo **File Reader.**


---

# 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, and the optional `goal` query parameter:

```
GET https://docs.digibee.com/documentation/connectors-and-triggers/pt-br/connectors/files/file-reader/read-files-in-a-folder.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
