> 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

Xoá file theo đường dẫn File Path.

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="https://275605936-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FN9cKpvJdcLU6FS8VMSTs%2Fuploads%2Fgit-blob-5c915310157392c3879e083c5700350ee1a7478b%2Fimage%20(151).png?alt=media" 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 by asking a question.

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

```
GET https://docs.gpmautomate.com/huong-dan-cac-action/file-and-folder/delete-file.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.
