Exist Activity

This activity is used to find if a particular file or directory exists in the specified path. This activity can be used along with a message box, write log, or write line activity to see if it exists.

Technical Reference:

 

       INPUT

CheckMode: This indicates if the file that we require to find that exists is a file or directory.

Path: This indicates the path in which the bot has to look for the indicated file or 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.”

True: Continues to execute the workflow irrespective of any error thrown.

False: Stops the workflow if it throws any error

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

     OUTPUT

Result: Define a Boolean to validate if the activity has been completed successfully.

* Mandatory fields to execute the workflow.

The following activity illustrates on how we can use the exist activity to find out if the file exists or not. Here we will be using a write log activity to see the result of the exist activity.

Example:

1.      Drag and drop an exist activity from the FS automation feature.

2.      Double click on the activity and from the drop down choose if we need to find a file or a directory

3.      In the path mention the name of the file with the path that needs to found

4.      Add a variable to the result box. Here we are adding Test as the variable.

5.      Drag and drop a write log activity below the exist activity.

6.      Add the variable as “Test.ToString” in the input string of the write log activity.

7.      Add the log level by choosing any one from the five options available. Here we are using Info.

8.Execute the workflow to see if the file exists in the given path or not.  

 

The bot finds if the file exists or not and gives the result in the Write log.