Rename File

Use this step to rename a file on the application server.

Last published at: March 31st, 2026

renameFile Step

Description:

This step renames the existing file on the application server. Note: If the new filename includes an extension, the file is renamed using that extension. If the new filename doesn't include an extension, the file is renamed with the new filename and the source file's extension.

The Rename File workflow step renames a specified file using the configured new file name and can store the new file path in a Variable or Global variable.

The step supports:

  • Specifying the file to be renamed.
  • Providing a new file name.
  • Using workflow-generated values for the new file name.
  • Storing the resulting file path in a Variable or Global variable.
  • Renaming files as part of workflow automation.
  • Reusing the new file path in subsequent workflow steps.
  • Returning a True or False result for subsequent workflow processing.

 

Inputs

  • New file name – The newFileName property specifies the new name to assign to the file. The property uses the string data type and is not marked as required in the step definition.
  • Path to the file - The filePath property specifies the path of the file that should be renamed. The property uses the string data type and is not marked as required in the step definition.
  • Variable/Global to store new file path – The newFilePathVarGlobal property specifies the Variable or Global variable in which the new file path can be stored.
 

 

Returns

  • True – The True return path can be connected to the next workflow activity when the rename operation follows the expected workflow path.
  • False – The False return path can be connected to an alternative workflow path or handling activity.
 

 

Usage:

The Rename File step is typically placed after a workflow has created, generated, downloaded, copied, or otherwise identified a file that needs to be given a different name.

The workflow supplies the path of the existing file and the new file name. The step can also store the resulting new file path in a Variable or Global variable for use by subsequent workflow activities.

A typical workflow pattern is:

Create/Get File → Rename File → Use Renamed File

The resulting file path can then be used by later workflow steps to:

  • Process the renamed file.
  • Move or copy the renamed file.
  • Attach the renamed file to an email.
  • Upload the renamed file.
  • Pass the renamed file to another activity.
  • Store or archive the renamed file.
  • Perform additional file processing.

 

Typical Workflow Suggestions:

Apply a Standard File Naming Convention

Use the step to rename files according to a consistent naming convention.

Example:

Create File → Rename File → Continue Process

Possible naming pattern:

Invoice-1045.pdf

or:

Customer-Request-1045.pdf

A consistent naming convention can make files easier to identify and process later in the workflow.

 

Add a Business Identifier to a File Name

Use workflow data to create a filename that contains a business identifier.

Example:

Get Request Details → Rename File → Process File

Possible name:

Request-REQ-1045.pdf

This can help associate the physical file with the workflow request that generated or processed it.

 

Include Customer Information

Use customer information available in the workflow when creating the new file name.

Example:

Get Customer Data → Rename File → Send File

Possible name:

Acme-Corporation-Request.pdf

This allows the file name to provide useful business context without requiring users to open the file.

 

Rename Generated Documents

Use the step after a document-generation activity to give the resulting file a meaningful name.

Example:

Generate Document → Rename File → Save Document

For example, a generated file might initially have a generic name and then be renamed to:

Purchase-Order-PO-2026-1045.pdf

 

Rename Downloaded Files

Use the step after retrieving a file from another system when the downloaded file needs a workflow-specific name.

Example:

Download File → Rename File → Process File

This can establish a predictable file name before subsequent workflow activities process the file.

 

Store the New File Path for Reuse

Use the Variable/Global to store the new file path property so that later workflow activities can access the location of the renamed file.

Example:

Rename File → Send Email

The renamed file path can be stored in a Variable or Global variable and then supplied to a subsequent activity.

The XML explicitly provides newFilePathVarGlobal for storing the new file path.

 

Prepare a File for Email

Rename a file before attaching or otherwise using it in an email workflow.

Example:

Generate Report → Rename File → Send Email

Possible name:

Monthly-Report-September-2026.pdf

This can provide recipients with a meaningful attachment name.

 

Prepare a File for Upload

Rename a file before passing it to a downstream integration or upload activity.

Example:

Create File → Rename File → Upload File

The renamed file can then be supplied to the subsequent upload activity using the stored new file path.

 

Archive Files Using a Consistent Name

Use the step before an archival operation to establish a standardized file name.

Example:

Process Document → Rename File → Archive File

Possible naming pattern:

Processed-Document-2026-1045.pdf

This can make archived files easier to identify and retrieve.

 

Add Date or Workflow Information to File Names

Use workflow-generated information to create names that distinguish files created during different workflow executions.

Example:

Generate Report → Rename File → Store Report

Possible naming pattern:

DailyReport-2026-09-07.pdf

Other useful information may include a request number, document type, workflow identifier, or other values available to the process.

 

Rename Files Before Downstream Processing

Place Rename File between file creation/retrieval and the activity that consumes the file.

Example:

Retrieve File → Rename File → Document Processing

This provides a clear point in the workflow where the file receives its intended name before subsequent processing.

 

Use Dynamic File Names

The New file name property is a string input, so the workflow can supply a name based on values available during process execution.

Example:

Retrieve Data → Build File Name → Rename File → Continue Process

A workflow can use a naming pattern such as:

{{DocumentType}}-{{RequestID}}-{{CustomerName}}.pdf

The exact mechanism for constructing the string depends on the Variables and other workflow steps involved.

 

Example:

Let’s build and execute the “renameFileDef” example.          

  • Create a new process definition called “renameFileDef” and open it in Designer mode.
  • Drag a “renameFile” step to the canvas.
  • Connect the dots to the “Start” and “renameFile” steps, as shown above. 
  • Select the line between the steps to configure the “Connection Properties”. The default property values are “None, True, False, Error, and Evaluate”. Depending on the step’s purpose, additional values are available for configuration.
  • Declare a variable or a global to store the new file path.
  • Click the “renameFile” step to configure its “Required” properties. Provide a name for the step, then click the Save button. Note: Click the "AI Predict" button to have the Copilot add new process steps that match your process description. 

 

  • Click the “renameFile” step to configure its “Optional” properties. Enter the new file name. Enter the actual path on the server. Enter a variable or a global to store the new file path. Click the Save button. 

 

  • The “Logging” configuration is necessary for documentation and also measures workflow progress and percent complete. This is achieved by configuring the step state and percent fields individually, as shown in the images below. Configure the “Logging” using the following properties.

 

  • Save the process definition, create a new instance, and execute it. Render the process instance and click the process step to view its properties. When the workflow reaches the Rename File step, FlowWright receives the configured file path and new file name and performs the rename operation. If the Variable/Global to store new file path property is configured, the resulting new file path is stored in the specified Variable or Global variable for use by subsequent workflow activities. The step provides True and False return paths for subsequent workflow processing.

 

Tips:

  • Verify that the Path to the file identifies the intended file before the step executes.
  • Use meaningful and consistent file naming conventions.
  • Include a business identifier when it helps users recognize the file.
  • Use Variables or workflow-generated values when the source file path is determined dynamically.
  • Use a meaningful Variable or Global name when storing the new file path.
  • Verify that the new file name is appropriate for the type of file being renamed.
  • Preserve the file extension when the downstream workflow depends on the extension.
  • Test the workflow with representative files before deploying it.
  • Verify the resulting file path before passing it to downstream activities.
  • Consider storing the resulting path so that subsequent workflow activities can access the renamed file.
  • Avoid unnecessarily long or ambiguous file names.
  • Use consistent separators and naming conventions across related workflows.
  • Test file names containing spaces and other characters used by the workflow environment.
  • Test the workflow when the source file does not exist or cannot be accessed.
  • Test the workflow when the destination name conflicts with another file, if applicable to the deployment environment.
  • Keep dynamically generated file names predictable and maintainable.
  • If the workflow processes user-supplied file names, test unexpected characters and formatting.
  • Consider connecting the False return path to an appropriate alternative or error-handling workflow.
  • Test downstream activities after changing the file naming convention.
  • Do not assume specific overwrite, collision, validation, or character-handling behavior unless confirmed by the FlowWright implementation.

 

Notes:

  • The Rename File step is defined in the File System category with the internal name renamefile, label “Rename a file”, and display name “Rename File.”
  • The step is implemented by FlowWright.Workflow.RenameFile in FlowWright.Workflow.dll and is defined as a Process step with 2 incoming connections and 2 outgoing connections.
  • The step defines three properties:
    • newFileName – New file name.
    • filePath – Path to the file.
    • newFilePathVarGlobal – Variable/Global to store the new file path. 
  • All three properties are defined as strings and are not marked as required in the XML definition.
  • The string data type is implemented by FlowWright.DataTypes.ClsTextBox in FlowWright.DataTypes.dll.
  • The step provides two return values:
    • False
    • True

 

Definition Sample:

You may provide a sample definition for the Rename File step for download and later import it into the FlowWright Process Definition XML page.

After importing a sample, verify and complete any missing configuration, including:

  • Path to the file.
  • New file name.
  • Variable or Global variable used to store the new file path.
  • Workflow Variable references.
  • Environment-specific file paths.
  • Downstream True and False workflow paths.
  • Any subsequent workflow activities that consume the renamed file.

After verifying the configuration, save the Process Definition before execution.

Click here to download the sample file.