Copy Activity
The Copy activity facilitates the duplication of files or folders from a source location to a specified destination. This activity supports both single item and batch operations, providing flexibility in managing file system resources.
| Field | Description | Requirement |
|---|---|---|
| File name | The full path to the source file or folder, including wildcards for batch processing. | Required |
| Destination path | The target directory where the files or folders will be copied. This path can include a new name for renaming during the copy process. | Required |
| Overwrite | Specifies whether to replace an existing file or folder at the destination if a name conflict occurs. | Optional |
Action Types & Examples
Activity Execution Status
- Format:
boolean - Example Result:
true
Overwrite Behavior
- Format:
boolean - Example Result:
true
Implementation Examples
Field Setup - File name examples: - Single folder: C:\Temp\Test - Single file: C:\Temp\Test.xlsx - Batch files (starting with 'a', .txt extension): C:\Temp\a*.txt - Batch files (all.xlsxfiles): C:\Temp\*.xlsx - Batch files (all files): C:\Temp\*.* - Batch files/folders (all items): C:\Temp\* - Destination path examples: - Copy folder with same name to Test folder: C:\Test - Copy folder and rename to Trial under Test folder: C:\Test\Trial - Copy file with same name to Test folder: C:\Test - Copy file and rename to newFile.xlsx under Test folder: C:\Test\newFile.xlsx - Overwrite status: - true: If a file or folder with the same name exists at the destination, it will be replaced. If no conflict exists, the copy proceeds. - false: If a file or folder with the same name exists at the destination, the copy operation will not occur, and an error will be raised. If no conflict exists, the copy proceeds.
Execution Parameters - Copy a specific file to a new location without overwriting: - File name: C:\SourceData\report.pdf - Destination path: C:\Archive\ - Overwrite: false - Copy all .log files from a source folder to a new destination folder, allowing overwrite: - File name: C:\ApplicationLogs\*.log - Destination path: C:\ProcessedLogs\Daily\ - Overwrite: true - Copy a folder and rename it at the destination: - File name: C:\Projects\Development - Destination path: C:\Projects\ProductionReady - Overwrite: true
Technical Notes
If the destination path ends with a file separator (e.g.,
C:\Temp\myFolder\), the file or folder is placed within that path, maintaining its original name. If the destination path includes a file or folder name at the end (e.g.,C:\Temp\myFolder\fileWithNewName.txt), the copy operation will also perform a rename. When copying a folder and not performing a simultaneous rename, ensure theDestination pathends with a file separator (e.g.,C:\TargetFolder\) to place the folder inside the target. If the path does not end with a separator and includes a name, it will be treated as a rename operation for the folder itself. If the destination is intended for content that will be unzipped, ensure the path specifies the target folder name (e.g.,C:\Temp\myFolder\extractedContent).