Download File

This activity is used to download a specific file from the specified directory of a
server to a local folder.

Technical Reference

 

 

 

 

INPUT

FilePath: Indicate the path in which the downloaded file has to be saved. 

You have the option to either hardcode the values in the "String” variable or pass the values as “String” datatype.

This accepts only the “String” datatype.

FtpFileName: Indicate the "Name of the file" to be downloaded and the directory in which the file is present.

You have the option to either hardcode the values in the "String” variable or pass the values as “String” datatype.

This accepts only the “String” datatype.

SaveFileName: Provide a name for the downloaded file to be saved.

You have the option to either hardcode the values in the "String” variable or pass the values as “String” datatype.

This accepts only the “String” datatype.

 

 

 

 

 

 

 

 

 

MISC

Display Name: Displays the name of the activity. The activity name can also be customized which helps 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 FTP 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,

Create a new solution or open an existing solution.

1.      Drag and drop a “FTP” activity which acts as a scope for all the activities in this
 feature.

a.      Double click on the activity.

b.      Enter the server name, username and password.

2.      Drag and drop a “DownloadFile” activity from the FTP automation feature.

a.      Double click on the activity.

b.      Enter the path in which the downloaded file has to be saved.

Navigate to the property section.

3.      Specify the “FtpFileName” and “SaveFileName”.

a.      The FTP file name should include the name of the directory in
 which the file is present and the name of the file.

b.      The SaveFileName should be the name to be given to the file that
 has to be saved. This should be given in “Strings”.

4.      To see the success state of the activity, declare a variable in the result box of the
 output section. This is in Boolean datatype.

5.      Drag and drop a write log activity below the download activity and enter the
variable if declared, with the extension “.ToString” as the result is stored in
“Boolean” datatype. For example, if the result box has the variable in “DF”
declared to it, then mention “DF.ToString.”

6.      Execute the workflow.

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