DriveWorks Pro 17: Copy File [send feedback...]

Copy File

The Copy file task will copy or move an existing file to a new location.

Properties

Property NameDescription
SourceThe path to source file.
DestinationThe path to destination file.
MoveTRUE to move the file, FALSE to copy it.
OverwriteTRUE to overwrite the destination file if it already exists, FALSE to leave it alone.
TitleChanges the Title (not the name) of the task.
If the new location does not exist the task will create the folder structure as applied to the Destination property (if valid).

Examples

The properties for this task are static by default see How To: Change A Static Property To A Dynamic Property to build rules for the property values.

Property nameExample ruleExample resultMeaning
Source"[Machine Name]\Content\" & DWVariableOldFileName & ".txt"[Machine Name]\Content\OldFile.txtOldFile.txt is the file to be copied.
Destination"[Machine Name]\Generated\" & DWVariableNewFileName & ".txt"[Machine Name]\Generated\NewFile.txtThe source file will be copied with the new name NewFile.txt
MoveMoveFileReturnTrueThe file will be moved to the new designated location.
OverwriteOverwriteFileReturnTrueThe file will overwrite the existing file (with the same name).

Using the Task in a Specification Macro

This task has different types of Outputs. For more information about Outputs see Specification Macros Task Node.

Outputs are only available within Specification Macros. Currently Outputs are not available for Specification Flow.

Status Outputs

This task supports Status Outputs. These can be used to perform different actions depending on what the status outcome of the task is. For more information see Status Outputs in the Task Node Outputs section of Specification Macros Task Node.

The status output navigation is as follows:

Success

  • File was copied.

Success with Warnings

  • N/A - should never get fulfilled.

Failed (one of the following occurred)

  • No file was specified.
  • Path was too long.
  • Path was invalid.
  • File doesn't exist.
  • Insufficient permissions to copy file.
  • General failure - Check the specification report for more details.

Table of Contents