Copy File

This activity helps the user to copy file from the respective location to another location specified
with it. We can also copy read-only files from one location to another. We can also copy a file
from a shared folder, granted we have access to it.

Technical Reference:

 

 

 

 

 

 

   INPUT

FilePath: Specify the file path of the file to be copied. You can also select the file manually by selecting the three dots adjacent to the path. This accepts only “String” datatype.

NewFilePath: Specify the file path to where the selected file needs to be pasted. You can also select the file manually by selecting the three dots  adjacent to the activity. This accepts only “String” datatype.

 

 

 

 

 

   

    MISC

Display Name: Displays the name of the activity. The activity name can also be customized which will help in troubleshooting.

SkipOnError: Specify the Boolean value as “True or False.”
True: Continues to execute the workflow irrespective of any error thrown.
False: Stops the workflow if it throws any error.
None: If the option is specified as blank, by default the activity will perform the “False” action.

Version: It specifies the version of the FS automation feature in use.

 

     OUTPUT

Result: It helps to view the execution state of the activity. It returns the values in Boolean format.
True: It indicates that the activity has been executed successfully without any error.
False: It indicates that the activity has been unsuccessful due to some unexceptional error thrown.

*Represents mandatory fields to execute the workflow

 Let’s see how this activity works,

1.      Create a new solution or use an existing solution.

2.      Drag and drop a “Copy file ” activity to the workflow.

3.      Double click on the activity and enter the path from where the file has to be copied
in the “from” section and enter the path where the file has to be pasted in the “to”
section. Here we are going to copy the file “Copy folder.docx” from the Documents
folder to the desktop.

4.      Navigate to the property section. Declare a variable in the Result box of the output
section. Here it is “CF”.

 

5.      Drag and drop a write log activity below the “Copy file” activity and enter the above
declared variable with the extension “.ToString” to convert the result from “Boolean”
datatype to “string” datatype. Here it is “CF.ToString”.

 

6.      Execute the workflow.

Click here to see how the activity works in a workflow.