> 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

Saiba como usar o conector File Reader na Digibee Integration Platform.

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="https://content.gitbook.com/content/SKBJ6ZiEWBU93x170HH4/blobs/drKkJ1rkvASmSuKdVdOx/How%20to%20file%20reader%2031%20oct.png" 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
