Command Reference

Copy Files

Copies files on the local system.

Action ID: 7
Action Category: File Operations

Settings

Locations

Source

The path and filename to copy from (this can include the wildcards "*" and "?").

Destination

The destination directory and/or file. Do not use wildcards in this field.

Note: The destination directory MUST already exist when performing this action. If Destination specifies a path to a file, all of the folders included in the path must already exist. You can use a Create Directory action to create a destination directory if necessary.

Options

Recurse subdirectories

If checked, the copy command will recurse through subdirectories when a wildcard is used in the Source field.

Overwrite existing files

If checked, existing destination files will be overwritten by source files. If unchecked, destination files will not be overwritten by source files.

Continue copying files even if one or more fail

If checked, the copy operation will continue even if some files fail to copy. If unchecked, the copy operation will stop as soon as the first error occurs.

Copy hidden and system files

If checked, files which have the "hidden" or "system" attributes set will be copied. If unchecked, hidden and system files will not be copied.

Return Values

Value
(%LastErrorNum%)

Simple Message
(%LastErrorMsg%)

Verbose Message
(%LastErrorDetails%)

0 (OK)

 

 

1

Could not copy file(s).

Invalid source specified.
<<Source>>

2

Could not copy file(s).

Invalid destination specified.
<<Destination>>

3

Could not copy file(s).

File not found.
<<Source>>

4

Could not copy file(s).

The specified path was not found.
<<Destination>>

5

Could not copy file(s).

One or more files could not be copied.
<<Comma separated list of files that could not be copied>>

Examples

Example 1

In this example we will copy a file called "setup.exe" from the "download" subdirectory to the user's temporary directory.

Source: %SrcDir%\download\setup.exe
Destination: %TempDir%

Example 2

In this example we will copy all the files from the "download" subdirectory to the user's temporary directory.

Source: %SrcDir%\download\*.*
Destination: %TempDir%

 

See Also: Alphabetical List of Actions, Categorical List of Actions, On Error tab