> For the complete documentation index, see [llms.txt](https://docs.gpmautomate.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.gpmautomate.com/automate-zh/action-shi-yong-zhi-nan/file-and-folder/file-read-all-lines.md).

# File read all lines

File read all lines 是用于读取一个 `.txt` 文本文件的操作,并自动将文件中的每一行拆分为一个单独的元素,然后将全部内容保存到输出变量中的一个数组(array)里。

当您有一份按行排列的数据列表(如代理列表、关键词列表、2fa 验证码列表等),并希望使用循环逐行取出处理时,此操作会非常有用。

🎥 查看更多操作指南视频:[点击这里](https://youtu.be/EH7olDLAb9c)。

> 🔗 查看关于使用方法的详细指南,请参考示例 [1. Đếm số dòng của một file văn bản (Text)](https://docs.gpmautomate.com/automate-zh/action-shi-yong-zhi-nan/file-and-folder/pages/k1ifz33w5FeJn5gvFJ0U#vi-du-thuc-te-dem-so-luong-link-facebook-trong-file-d-2.txt),位于 Coun&#x74;*)* 部分。


---

# 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.gpmautomate.com/automate-zh/action-shi-yong-zhi-nan/file-and-folder/file-read-all-lines.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.
