Contact Us 1-800-596-4880

Copy File

This Action Step copies a file from one directory to another. If the file to be copied if not available or the copied file is already located in the destination folder, an error message will interrupt the Workflow.

Properties

File Operation Settings:

  • Destination directory Enter the path to the target directory where the copied file is to be saved here. You can specify an absolute or relative path. If a relative path is used, then the path relates to the Base Path variable.

  • Directory path This is where you enter the path to the directory where the file to be copied from. You can specify an absolute or relative path. If a relative path is used, then the path relates to the Base Path variable.

  • File Name Enter the name of the file that is to be copied here.

  • New File Name Enter a new name for the file that is to be inserted. This option will only be reported if the option Use different file name has been selected.

  • Overwrite existing file This option enables you to overwrite an existing file with the same name in the destination folder.

  • Use different file name Selecting this option means that the copied file will be saved under a new name in the destination directory. Enter the new name in the New File Name field.

Inbound Variables

  • Directory path This is where you enter the path to the directory where the file to be copied from. You can specify an absolute or relative path. If a relative path is used, then the path relates to the Base Path variable.

  • File Name Enter the name of the file that is to be copied here.

  • Destination directory Enter the path to the target directory where the copied file is to be saved here. You can specify an absolute or relative path. If a relative path is used, then the path relates to the Base Path variable.

Outbound Variables

IsCopied The Copy File.IsCopied variable indicates whether the file could be copied or not (True/False).

Destination directory The Copy File.Destination directory variable provides the path to the destination directory.

New File Name The Copy File.New file Name variable provides the copied file’s new name.

File name TheCopy File.File Name variable provides the name of the copied file.

Directory path The Copy File.Directory Path variable provides the path to the source directory.

Wizard

  • Directory path Specify the path to the file that is to be copied here. You can create an absolute path or a path relative to the Base Path. The initial value is %STWS_BASEPATH%. You can also insert variables from the Workflow in order to construct the path. To do so, click on the pin and select one of the available variables.

  • File name Enter the name of the file that is to be copied here. You can also insert a variable from the Workflow as the File Name. To do so, click on the pin and select one of the available variables.

  • Destination directory Specify the destination path for the file that is to be copied. You can create an absolute path or a path relative to the Base Path. The initial value is %STWS_BASEPATH%. You can also insert variables from the Workflow in order to construct the path. To do so, click on the pin and select one of the available variables.

  • New file name This field will only be shown if you have enabled the option Use different file name for copy. The wizard uses the file name of the source file and adds copy at the end. You can also specify the new name for the copied file yourself. You can also insert a variable from the Workflow as the _New file name. To do so, click on the pin and select one of the available variables.

  • Overwrite existing file If this option has not been enabled, an error message will interrupt the Workflow if there is already a file with the same name in the destination directory. If this option has been enabled and the file already exists, the copied file will replace it and no acknowledgment will be given.