Rename Directory

Use this step to rename the directory.

Last published at: March 31st, 2026

renameDirectory Step

Description:

The Rename Directory workflow step changes the name of a specified directory during workflow execution.

The step supports:

  • Specifying the directory to be renamed.
  • Providing a new directory name.
  • Using workflow-generated values for the new directory name.
  • Renaming directories as part of workflow automation.
  • Applying standardized directory naming conventions.
  • Returning a True or False result for subsequent workflow processing.

 

Inputs

  • newDirectoryName – The newDirectoryName property specifies the new name to assign to the directory. It uses the string data type.
  • directoryPath - The directoryPath property specifies the path to the directory that should be renamed. It uses the string data type.
 

 

Returns

  • True – The True return path can be connected to the next workflow activity when the directory rename operation produces the expected workflow result.
  • False – The False return path can be connected to an alternative workflow path or appropriate handling when the expected result is not produced.
 

 

Usage:

The Rename Directory step is typically placed after a workflow has created, identified, or otherwise obtained a directory that needs to be given a different name.

The workflow supplies the path to the existing directory and the new directory name.

A typical workflow pattern is:

Create/Get Directory → Rename Directory → Continue Process

The renamed directory can then be used by later workflow activities to:

  • Process files contained within the directory.
  • Move or copy the renamed directory.
  • Archive the directory.
  • Continue file-processing activities.
  • Organize workflow-generated files.
  • Perform additional directory operations.
  • Pass the renamed directory location to another activity.

 

Typical Workflow Suggestions:

Apply a Standard Directory Naming Convention

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

Example:

Create Directory → Rename Directory → Continue Process

Possible naming patterns:

Customer-1045

or:

Project-2026-1045

A standardized naming convention can make directories easier to identify and manage.

 

Add a Business Identifier to a Directory Name

Use workflow information to assign a meaningful business identifier to a directory.

Example:

Get Request Details → Rename Directory → Process Files

Possible directory name:

Request-REQ-1045

This can help associate the directory with the workflow request that generated or is processing its contents.

 

Include Customer Information

Use customer information available within the workflow when assigning a new directory name.

Example:

Get Customer Data → Rename Directory → Process Customer Files

Possible directory name:

Acme-Corporation-Documents

This can make directories easier for users or downstream processes to recognize.

 

Organize Workflow-Generated Files

Use the step to establish an appropriate directory name after a workflow creates a directory.

Example:

Create Working Directory → Rename Directory → Generate Documents

Possible directory name:

Invoice-Processing-INV-1045

The workflow can then continue generating or processing files within the renamed directory.

 

Rename Download or Import Directories

Use this step after a directory has been created or identified for downloaded or imported files.

Example:

Download Files → Rename Directory → Process Files

The directory can be renamed according to the business process or source associated with the files.

 

Create Project-Specific Directories

Use workflow data to create meaningful directory names for project-related processing.

Example:

Create Project Directory → Rename Directory → Process Project Files

Possible directory name:

Project-PROJ-2026-015

This provides a predictable directory structure for project processing.

 

Create Date-Based Directory Names

Use workflow information to establish a directory naming convention based on processing dates.

Example:

Create Directory → Rename Directory → Archive Files

Possible directory name:

2026-09-07

This can be useful when directories are organized according to processing or archival dates.

 

Rename Before Downstream File Processing

Place Rename Directory before activities that operate on the directory or its contents.

Example:

Retrieve Directory → Rename Directory → Process Files

This establishes the intended directory name before subsequent processing begins.

 

Use Dynamic Directory Names

The New directory name property is a string input that allows the workflow to supply a dynamically determined name.

Example:

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

A workflow could use a naming pattern such as:

{{DocumentType}}-{{RequestID}}-{{CustomerName}}

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

 

Separate Processing Stages with Directory Names

Use meaningful directory names to distinguish processing stages.

Example:

Create Directory → Rename Directory → Document Processing → Archive

Possible directory names might identify the business process or processing batch.

This can make file-system organization easier to understand when multiple workflow instances are operating on different directories.

 

Use the Return Paths for Workflow Routing

The step provides True and False return paths, allowing different workflows to be connected to it.

A typical pattern is:

Start → Rename Directory → Continue Process

with the alternative return path connected to appropriate handling.

 

Example:

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

  • Create a new process definition called “renameDirectoryDef” and open it in Designer mode.
  • Drag a “renameDirectory” step to the canvas. 
  • Connect the dots between the “Start” and “renameDirectory” 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.
  • Click the “renameDirectory” 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 Copilot add new process steps that match your process description. 

 

  • Click the “renameDirectory” step to configure its “Optional” properties. Provide the source directory path to rename. Provide a new directory name. Click the Save button. 

 

  • The “Logging” configuration setting is necessary for documentation and for tracking 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 Directory step, the configured directory path and new directory name are supplied to the step. The step then performs the directory rename operation. The True or False return value can be used to control subsequent workflow processing.

 

Tips:

  • Verify that the Path to the directory identifies the intended directory before the step executes.
  • Use meaningful and consistent directory naming conventions.
  • Include a business identifier when it helps users recognize the directory.
  • Use workflow-generated values when the new directory name is determined dynamically.
  • Keep dynamically generated directory names predictable and maintainable.
  • Avoid unnecessarily long or ambiguous directory names.
  • Use consistent separators and naming patterns across related workflows.
  • Test the workflow with representative directories before deploying it.
  • Verify that the source directory exists and is accessible before the step executes.
  • Test the workflow when the source directory does not exist.
  • Test directory names containing spaces and other characters used by the workflow environment.
  • Consider the effect of renaming a directory on subsequent workflow activities that reference its original path.
  • Ensure that downstream activities use the appropriate directory path after the rename operation.
  • Test the workflow when another directory may already have the intended name.
  • Keep directory naming conventions consistent when multiple workflow instances use the same file-system structure.
  • If the workflow processes user-supplied names, test unexpected characters and formatting.
  • Consider connecting the False return path to appropriate alternative or error-handling activities.
  • Test the workflow after changing the directory naming convention.
  • Do not assume specific overwrite, collision, validation, path-length, or character-handling behavior unless confirmed by the FlowWright implementation.
  • Avoid placing sensitive information in directory names when the directory may be accessible to users or external systems.

 

Notes:

  • The Rename Directory step is defined in the File System category with the internal name renamedirectory, label “Rename a directory”, and display name “Rename Directory.”
  • The step is implemented by FlowWright.Workflow.RenameDirectory in FlowWright.Workflow.dll and is defined as a Process step with 2 incoming connections and 2 outgoing connections.
  • The step defines two properties:
    • newDirectoryName – New directory name.
    • directoryPath – Path to the directory. 
  • Both properties use the string data type 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 Directory 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 directory.
  • New directory name.
  • Workflow Variable references used to construct the directory path or name.
  • Environment-specific file-system paths.
  • Downstream True and False workflow paths.
  • Subsequent activities that reference the renamed directory.

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

Click here to download the sample file.