Directory Exists

This activity is used to check if a directory exists in the specified path.

Technical Reference

                INPUT

DirectoryName: Provide the name of the directory for which you want to check the existence status.

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 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 FTP automation feature in use.

 

 

OUTPUT

DirectoryExist: This indicates the exist status of the directory. It accepts only “Boolean” datatype.

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 open an existing solution. Here I am going to check if
 the directory “Testind” is available in the server.

2.      Drag and drop a “FTP” activity as this is the scope for all the activities in this feature.

a.      Double click on the activity.

b.      Enter the server name, username and password.

3.      Now drop a “Directory Exists” activity to the workflow.

a.      Indicate the name of the directory for which the exists status has to
be found. Here I am going to find if the directory “Testind” exists or not.

b.      Specify a variable in the directory exist box of the output segment in
which the exist status will be stored. Here I am declaring the variable “DE”

4.      We can use a writeline or writelog activity to see the result of this activity. Specify the
variable in the writeline or writelog along with “.ToString” extension to view the result.
We do this to convert the “Boolean” datatype to “String” datatype. For example,
“DE.ToString".

5.      Execute the workflow.

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