> 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/copy-file.md).

# Copy file

Copy file là hành động dùng để sao chép một tệp tin từ vị trí này sang một vị trí khác trên ổ cứng máy tính. Hành động này sẽ tạo ra một bản sao hoàn toàn mới tại nơi đến và vẫn giữ nguyên tệp tin gốc ở vị trí ban đầu.

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

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

* Source File: Đường dẫn tuyệt đối của file nguồn cần copy (Ví dụ: `D:\data\template.xlsx`).
* Destination File: Đường dẫn tuyệt đối của file đích nơi sao chép đến (Ví dụ: `D:\backup\report_2026.xlsx`).

#### Ví dụ thực tế: Tự động nhân bản file Excel mẫu trước khi ghi dữ liệu

Khi làm kịch bản cào dữ liệu (Data Crawler) hoặc điền báo cáo, bạn thường có một file Excel mẫu (`template.xlsx`) đã được định dạng sẵn các cột tiêu đề. Bạn không muốn kịch bản ghi đè trực tiếp dữ liệu mới làm hỏng mất file mẫu này. Giải pháp là mỗi lần chạy kịch bản, hệ thống sẽ tự động nhân bản ra một file mới để sử dụng:

* Cách cấu hình:
  * Source File: Điền đường dẫn file mẫu: `D:\GPM\template.xlsx`
  * Destination File: Điền đường dẫn file mới sẽ dùng để ghi dữ liệu: `D:\GPM\data_output.xlsx`
* Kết quả: Hệ thống sẽ lấy file `template.xlsx`, tạo ra một bản sao chính xác và đặt tên là `data_output.xlsx` tại thư mục chỉ định. Các hành động phía sau của kịch bản (như *Write excel file*) sẽ chỉ tương tác và ghi dữ liệu vào file `data_output.xlsx` này, giúp file mẫu của bạn luôn được an toàn và sạch sẽ cho các lần chạy tiếp theo.

<figure><img src="/files/ZeSsWasunaCu2Ik95XF4" 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/copy-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.
