---
schema_version: "1"
id: 739f8110f0fad3ee82be64d2bf0f8f179af8650bb984421cb2fbdf2360fbd005
title: Delete File
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/rpa-builder/latest/toolbox-file-operations-delete-file.md
canonical_url: https://docs.mulesoft.com/rpa-builder/latest/toolbox-file-operations-delete-file
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 891b3ae4633cefdf2322f898eea49c1adced2f452a006a269289e9ce89788e59
description: MuleSoft Documentation Site
release: "6.7"
latest: true
---
---
product: RPA Builder
version: 6.7
is-latest-version: true
---

# 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/latest/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.
