> 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/huong-dan-cac-action/file-and-folder/delete-file.md).

# Delete file

Delete file là hành động dùng để xóa bỏ hoàn toàn một tệp tin ra khỏi ổ cứng máy tính theo đường dẫn được chỉ định.

🎥 Xem thêm video hướng dẫn: [Tại đây](https://youtu.be/EH7olDLAb9c).

> ⚠️ Lưu ý quan trọng: Tệp tin bị xóa bằng hành động này sẽ biến mất vĩnh viễn và không nằm trong Thùng rác (Recycle Bin) của Windows. Do đó, bạn cần chắc chắn về đường dẫn trước khi thực thi để tránh xóa nhầm dữ liệu quan trọng.

#### Tham số cấu hình:

* File Path: Đường dẫn tuyệt đối dẫn đến file cần xóa trên máy tính (Ví dụ: `D:\data\temp_cookie.txt`).

#### Ví dụ thực tế: Tự động dọn dẹp file tạm sau khi kết thúc kịch bản

Khi chạy các kịch bản như tải video từ trên mạng về để đăng reup sang kênh khác, hoặc xuất dữ liệu tạm thời ra file text để xử lý chuỗi. Sau khi đã hoàn thành xong công việc (video đã upload xong, dữ liệu đã được đồng bộ lên Google Sheet), bạn cần xóa các file trung gian này đi để tránh đầy bộ nhớ máy tính.

* Cách cấu hình:
  * Ở cuối kịch bản, bạn gọi hành động Delete file.
  * File Path: Điền đường dẫn của file tạm đã dùng, ví dụ: `D:\render\temp_video.mp4`.
* Kết quả: Hệ thống sẽ xóa sạch file `temp_video.mp4` tại thư mục ổ D. Thư mục làm việc của bạn sẽ luôn gọn gàng và máy tính không bị tình trạng tràn ổ cứng sau nhiều ngày treo luồng tự động.

<figure><img src="/files/0SuB9KKN2WtYgPFquY5L" alt=""><figcaption></figcaption></figure>


---

# 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/huong-dan-cac-action/file-and-folder/delete-file.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.
