Directory exists

This activity is used to check if a directory exists in the specified path. This activity requires the server’s name, username, and password to proceed with activities in this feature.

Technical Reference:

 

INPUT

DirectoryName: Specify the name of the directory which has to be validated.

 

 

 

 

 

 

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

DirectoryExist: Declare a variable here to see the output.

Result: Define the condition that you prefer to validate. It supports only Boolean value.

* Mandatory fields to execute the workflow.

The following example illustrates on how we can use the FTP automation feature to see if a directory exists or not.

Example:

1.      Drag and drop a directory exists activity inside a FTP scope.

2.      Double click on the activity.

3.      Enter the directory path of the file to be validated if it exists or not. Here we just add the name of the directory within double quotes.

4.      Declare a variable in the directory exist box in the output segment to see the result. Here it is “Exists.”

5.      Drag and drop a writelog activity below the directory exists activity

6.      Enter the same variable in the writelog which was declared in the directory exist box. Here we enter it as Exist.ToString since the write log accepts only string values.

7.      Enter the log level as “Info.”

8.      Execute the activity

 

The bot executes the activity and gives the result as True, which means the directory exists.