Skip to content

Copy Command: copy

The Copy command is used to duplicate a file from one folder to another within an automation workflow. This ensures that the original file remains intact while a copy is placed in the specified destination.

Example: Suppose you want to copy a file named Report.xlsx from C:\Projects to C:\Backups.

Steps to configure:

  1. Select Set a Variable Value from the Action dropdown.
  2. Enter a variable name in Element Key (e.g., CopyStatus). This variable will store the result of the Case execution (True if the file gets copied successfully or False otherwise).
  3. Click on Form, select Functions, and choose File Handler Functions.
  4. In the Cmd field, select Copy and provide:
    • Source: Specify the full path of the file to be copied (e.g., C:\Projects\Report.xlsx).
    • Destination: Provide the destination folder path (e.g., C:\Backups).
    • Overwrite: Specify whether to overwrite existing files (True or False).
    • Result: Select the desired output type:
      • Boolean: Returns true if the file is copied successfully; otherwise, returns false.
      • String: Returns the file path of the copied file on execution.
scrn-copy-command-tabular-view
Tabular View
scrn-copy-command-card-view
Card View

Outcome:

  • If Result is set to Boolean: Returns true for successful operations or false for failures.
  • If Result is set to String: Returns the path of the copied file upon success.
  • The result is stored in the variable defined in the Element Key This variable can be used in later steps of your automation process to reference the stored information using the syntax ${CopyStatus}.

Back To Top