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.

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 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

Here’s an example of how the “DeleteFile” activity works –

In the following example, I am removing an unwanted file from my system using
this activity.

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

2.          Drag and drop the “DeleteFile” activity and set it as start node.

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

b.          You can choose the path by clicking on the “Three dots” against the field.

c.           Here I have chosen a sample file to delete.

3.          Now, save and execute the workflow.

4.          You can view the execution result of the activity by adding the “Writelog”
activity to the workflow.

The bot will delete the mentioned file from the specified path.

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