---
schema_version: "1"
id: 8ffd7df86371e3ef278b989196f6dacd2c7e4265e0b6861957e5bb1f764000ff
title: Rename File
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/rpa-builder/latest/toolbox-file-operations-rename-file.md
canonical_url: https://docs.mulesoft.com/rpa-builder/latest/toolbox-file-operations-rename-file
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 0eb36d02fe749e3db59d6ebd521cc47707ae665784b34a90d521eb6cb163a799
description: MuleSoft Documentation Site
release: "6.7"
latest: true
---
---
product: RPA Builder
version: 6.7
is-latest-version: true
---

# Rename File

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

This action step renames a file. If the renamed file already exists in the destination folder, the
workflow is interrupted with an error message.

## Properties

**File Operation Settings:**

- **Directory path** Enter the path to the directory where the file to be renamed is located. 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 here of the file that is to be renamed.

- **New File Name** Here you enter he new name of the file to be renamed.

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 where the file to be renamed is located. 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 here of the file that is to be renamed.

**New File Name** Here you enter he new name of the file to be renamed.

## Outbound Variables

**IsRenamed** The _Rename File.IsRenamed_ variable indicates whether the file could be renamed or
not (True/False).

**New File Name** The _Rename File.New file Name_ provides the file’s new name.

**File name** The _Rename File.File Name_ variable provides the name of the file that is to be
renamed.

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

## Wizard

- **Directory path** Specify the path to the file that is to be renamed. 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 here that is to be renamed. 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.

- **New file name** Enter the new name for the file here. You can also insert a variable from the
  Workflow as the _New file name_. To do so, click on the pin and select one of the available
  variables.
