The Copy File action is used to copy files on an individual machine or across a network.
From the Task Builder Available Actions pane, open the File folder and double-click the Copy File action or drag it into the Steps pane. The following dialog appears:
In the Source box, click the Open Folder button and navigate to the files to be copied. Use SHIFT+click to select groups of files, or CTRL+click to select multiple individual files. You can use asterisk (*) and question mark (?) as wildcard characters. For example, use *.DOC to include all files in the selected folder with a .DOC extension. Separate multiple entries with a pipe symbol (|). Example: C:\SourceFolder\*.doc|SourceFile1.txt
In the Destination
box, click the Open Folder
button and navigate to the file or folder, or enter the path and (optionally)
the file name for the destination.
Folders that do not exist will be created at runtime provided the logged-on user has the rights to do so. Example path: C:\ExistingFolder\NewCopyFolder\
To populate a dataset with the result, enter a name
for the dataset in the Create and populate
dataset with result information box. (Dataset names must be alphanumeric,
begin with a letter, and contain no spaces.)
The dataset fields will be Source, Destination, Result, and Message. The Result field returns 0 for success or a Windows error code for failure. The Message field provides textual information about the result.
Click the Options tab and select or clear the check boxes according to the following guidelines:
Include subfolders: includes the subfolders of the selected source folder. If this is not selected, the files stored directly in the selected source folder are copied and the subfolders are ignored.
Preserve folder structure: maintains the folder structure for the subfolders as it exists in the source location. If this is not selected, files from the subfolders are copied directly into the destination folder.
Include empty subfolders: creates subfolders at the destination location even if they are empty at the source location.
Only folder structure: copies the folder structure, but does not copy any files.
Overwrite if exist: overwrites any existing files in the destination location that have the same names as the copied source files. If this is not selected, files that already exist are skipped.
Only if newer: overwrites files only if the source file is newer than the destination file.
Only if exists in destination: copies only files that already exist in the destination location. All other files in the selected source folder are ignored.
Overwrite read-only files: overwrites files that are marked read-only. If this is not selected read-only files are skipped.
Overwrite hidden files: overwrites files marked hidden. If this is not selected, hidden files are skipped.
Turn archive attribute off: turns off the Windows archive attribute in the source files. This indicates to many backup programs that the file has already been backed up.
In the Exclude mask box, enter the names of any files or folders within the selected source folder that you want to exclude from the action. You can use asterisk (*) and question mark (?) as wildcard characters. Separate multiple entries with a pipe symbol (|).
To exclude files from the action based on date, select the Only if newer than or Only if older than check boxes. Then use the date and time boxes to select the desired date and time. You can also click the Custom button and select a limiter such as Last 24 hours, or you can select Expression and enter an expression.
To limit the action according to file attributes, click the Attributes tab and then select On or Off for any attributes that you want used as criteria in the file selection. The default is Doesn't matter, which means the attribute will be ignored. The attributes to select from are: Read-only, Archive, System, Hidden, and Compression.
To set the Description tab properties, refer to Description Tab Options.
To set the Error Causes and On Error tab properties, refer to Step Error Handling.
When finished, click OK to save settings and close the properties dialog window.
Adding Task Steps
Copy File Action