> For the complete documentation index, see [llms.txt](https://hiimmaxx7s-organization.gitbook.io/gpm-automate/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hiimmaxx7s-organization.gitbook.io/gpm-automate/no-code-automation/file-and-folder/file-read-all-lines.md).

# File read all lines

VD: Bạn có 1 file text `proxies_list.txt` như hình bên dưới, đường dẫn là `D:\proxies_list.txt`\
File text này gồm 5 dòng, mỗi dòng tương ứng với 1 proxy.

Chú ý: Bạn có thể lấy được số dòng của file text bằng action Count như hướng dẫn ở đây:\
<https://docs.gpmautomate.com/no-code-automation/variables/count>

Bạn áp dụng điền cho action File read all lines như sau:

<figure><img src="/files/Khod9D3zp8PKwBZ8hkG9" alt=""><figcaption><p>File read all lines</p></figcaption></figure>

<figure><img src="/files/ICqLRVxCCTQp8Taq3qLu" alt=""><figcaption><p>File D:\proxies_list.txt</p></figcaption></figure>

<figure><img src="/files/ut9ad8r0elyU66Ukd0JP" alt=""><figcaption><p>Nội dung file proxies_list.txt</p></figcaption></figure>

Khi đó kết quả trả về là 1 mảng $fileContent, với index bắt đầu từ 0, và các phần tử của nó lần lượt là:

* $fileContent\[0] = 182.74.243.35:8080:zkf82mx:pa9sLd3q
* $fileContent\[1] = 103.152.232.153:8080:nv38qkz:vK28szpL
* $fileContent\[2] = 185.199.228.171:7492:alx9wpe:Jd72kq1x
* $fileContent\[3] = 134.209.29.120:3128:rcm1vuo:Yp7dLq3n
* $fileContent\[4] = 47.243.180.142:8080:txe57nd:Wx9qTf6b

Bạn có thể kết hợp với vòng lặp For để đọc nội dung file text như hướng dẫn trên.
