File Exists


This activity helps to find out if a file exists in a directory or not.

 

 

 

 

 

Technical Reference

 

 

INPUT

FilePath: Specify the name of the file to find if it exists or not. Mention the name of the file along with the directory.

 

 

 

 

 

 

 

MISC

Display Name: Displays the name of the activity. You can also customize the activity name to help troubleshoot issues faster. This name will be used for logging purposes.

SkipOnError: It specifies whether to continue executing the workflow even if it throws an error. This supports only Boolean value “True or False”. By default, it is set to “False”

True: Continues the workflow to the next step

False: Stops the workflow and throws an error.

Version: It specifies the version of the FTP automation feature in use

 

OUTPUT

FileExist: Declare a variable here to view the result if the file exists or not. This is not a mandatory field however to know whether the file exists declare a variable.

 Result: Define the condition that you prefer to validate. It supports only Boolean value. This is not a mandatory field however to get the result of the activity declare a variable here.

*Mandatory fields to execute the workflow.

The following example illustrates on how we can use the file exists activity to find out if a file exists in a specified directory.

Example:

1.      Drag and drop a file exists activity inside the FTP scope

2.      Double click on the file exists activity.

3.      Mention the file path.

4.      Enter the directory name and file name.

5.      Declare a variable as “Exists” in the FileExists box from the properties panel.

6.      Drag and drop a writelog activity below the FileExists activity.

7.      Enter the variable as “Exists.ToString” in the input string of the write log activity.

8.      Enter the log level as “info”.

9.      Execute the activity

 

The bot executes the activity and declares if the given file exists or not.