# Copy Files

### Description

The Copy Files action copies one of more files or folders.

### Files tab

| Option                  | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Action Name             | Indicates the name of the action.                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| Source Environment      | <p>Indicates the file system or specific cluster on which the item you want to input can be found. Options are Local and \<Static>.</p><ul><li>Local: Specifies that the item specified in the File/Folder field is in a file system that is local to Hop.</li><li>\<Static>: Specifies that the item specified in the File/Folder field should use the path name in that field, exactly. Use this if you already know a file path and you simply want to copy and paste it into the window.</li></ul> |
| Source File/Folder\* \* | The file or directory to copy from. If you choose an option other than \<Static> in the Source Environment field, click the button in the field to view the Open File window.                                                                                                                                                                                                                                                                                                                          |
| Wildcard                | Defines the files that are copied in regular expression terms (instead of static file names), for instance: .\*\\.txt would be any file with a .txt extension.                                                                                                                                                                                                                                                                                                                                         |
| Destination Environment | <p>Indicates the file system or specific cluster where you want the file to be placed. Options are Local and \<Static>.</p><ul><li>Local: Specifies that the item specified in the File/Folder field is in a file system that is local to Hop.</li><li>\<Static>: Specifies that the item specified in the File/Folder field should use the path name in that field, exactly. Use this if you already know a file path and you simply want to copy and paste it into the window.</li></ul>             |
| Destination File        | Indicates the name of the destination environment. If you choose an option other than \<Static> in the Destination Environment field, click the button in the field to view the Open File window.                                                                                                                                                                                                                                                                                                      |

### Settings

| Option                             | Description                                                                                                                                                                          | Default   |
| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------- |
| Include Subfolders                 | If selected, all subdirectories within the chosen directory will be copied as well                                                                                                   | unchecked |
| Destination is a file              | Determines whether the destination is a file or a directory                                                                                                                          | unchecked |
| Copy empty folders                 | If selected, will copy all directories, even if they are empty the Include Subfolders option must be selected for this option to be valid. (Wildcard MUST be blank for this to work) | checked   |
| Create destination folder          | If selected, will create the specified destination directory if it does not currently exist                                                                                          | unchecked |
| Replace existing files             | If selected, duplicate files in the destination directory will be overwritten                                                                                                        | unchecked |
| Remove source files                | If selected, removes the source files after copy (a move procedure)                                                                                                                  | unchecked |
| Copy previous results to arguments | Copies the previous results to arguments.                                                                                                                                            | unchecked |
| Add files to result files name     | Any files that are copied will appear as a result from this action; shows a list of files that were copied in this action                                                            | unchecked |


---

# Agent Instructions: 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:

```
GET https://docs.primeur.com/data-shaper-1.21/knowing-the-data-shaper-designer/workflows/actions/copyfiles.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
