Delete File

This activity helps the user to delete a file from the specified location. We can also
delete a file from a shared folder, granted we have access to it.

Technical Reference

 

   INPUT

File Path: Specify the path of the file which has to be deleted. It accepts only “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 FS 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 to use this activity.

1.      Create a new solution or open an existing solution.

2.      Drag and drop a delete file activity.

a.      Double click on the activity to enter the file path.

b.      We can also navigate to the property section to enter the file path.

3.      Specify a variable in the result box of the output section to see the success state
of the activity.  Here it is “DF”. This is in “Boolean” datatype.

4.      We can use this variable in a writelog or write line activity with a “.ToString” extension
to see the result. For example: DF.ToString. This is done to convert the “Boolean”
datatype to “String” datatype.

 

5.      Execute the workflow.

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

v4.0.2