---
schema_version: "1"
id: 3a0066d47a57775ba0e5ea7c59819d73d054501c40fb91445854bc8b0e88c3d5
title: Delete File
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/rpa-builder/6.6/toolbox-file-operations-delete-file.md
canonical_url: https://docs.mulesoft.com/rpa-builder/6.6/toolbox-file-operations-delete-file
source_site: docs.mulesoft.com
content_type: documentation
content_hash: afcf32e06fa09eec7c0395bc48ea0bd8cd03fb09552dc53bad57bddec34ef539
description: MuleSoft Documentation Site
release: "6.6"
latest: false
---
---
product: RPA Builder
version: 6.6
---

# Delete File

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

_Delete File_ will delete a file located at the specified path. The Action Step can be used, for
example, to delete files which were generated within a _Workflow_. If the file for deletion does not
exist, the Action Step does **not** terminate the Workflow with an error. There is however an option
that enables the generation of an error message in the event of a non-existent file.

## Properties

**File Operation Settings**

- **Directory path** Enter the path to the directory from which the file is to be deleted. You can
  specify an absolute or relative path. If a relative path is used, then the path relates to the
  _Base Path_ variable.

- **File Name** The name of the file to delete.

  This field does not support placeholders. For further information, see
  [Path / file name / invalid characters](https://docs.mulesoft.com/rpa-builder/6.6/toolbox-file-operations#invalid-characters).

- **Force error if file does not exist** If this option has been enabled, an error message will
  interrupt the _Workflow_ if the file for deletion does not exist. If this option is not enabled
  and the file does not exist, the _Workflow_ will continue and no error message will be generated.

Other Properties that are the same in all Action Steps are described in the section on **Common
Properties**. For reasons of clarity they are not shown here.

## Inbound Variables

- **Directory path** Enter the path to the directory from which the file is to be deleted. You can
  specify an absolute or relative path. If a relative path is used, then the path relates to the
  _Base Path_ variable.

- **File Name** Enter the name of the file that is to be deleted.

## Outbound Variables

**IsDeleted** The _Delete File.IsDeleted_ variable indicates whether the file could be deleted or
not (True/False).

**File Name** The _Delete File.File Name_ variable provides the name of the file that is to be
deleted.

**Directory path** The _Delete File.Directory Path_ variable provides the path that is used.

## Wizard

- **Directory path** Specify the path to the file that is to be deleted. You can create an absolute
  path or a path relative to the _Base Path_. The initial value is %STWS\_BASEPATH%. Select an
  existing path. You can also insert variables from the _Workflow_ in order to construct the path.
  To do so, click on the pin and select one of the available variables.

- **File name** Enter the name of the file that is to be deleted. You can also insert a variable
  from the Workflow as the _File Name_. To do so, click on the pin and select one of the available
  variables.

- **Force error if file does not exist** If this option has been enabled, an error message will
  interrupt the _Workflow_ if the file for deletion does not exist. If this option is not enabled
  and the file does not exist, the _Workflow_ will continue and no error message will be generated.
