Skip to content

Copy File

Type: copy-file  ·  Package: Filesystem Activities v1.0.0  ·  Output: string

Copies a file from a source path to a destination path, leaving the original in place. Use it to back up a file before modifying it, duplicating a template, or distributing a document to multiple folders.

Copy the file from source to destination. By default does not overwrite: if the destination already exists, the activity fails (unless you put overwrite = true).

ParameterEditorDescription
sourceexpressionSource file path.
destinationexpressionPath of the destination file.
ParameterEditorDescription
overwritebooleanReplace if the destination already exists. By default false.

Returns the destination path of the copied file, in case you want to capture it into an output variable.

Back up a file before processing:

Copy File source = = "C:/datos/maestro.xlsx" destination = = "C:/backups/maestro_" + today().ToString("yyyyMMdd") + ".xlsx" overwrite = true