Description:
The Rename File workflow step renames a specified file on an SFTP server.
The step uses a configured SFTP connection, identifies the existing file by its relative path, and specifies the new file name.
The step supports:
- Renaming a file on an SFTP server.
- Selecting a configured SFTP connection.
- Specifying the relative path of the file to be renamed.
- Specifying the new file name.
- Returning a success or failure result.
This step can be used for:
- Renaming files after processing.
- Marking files as processed through naming conventions.
- Changing file names based on workflow status.
- Organizing inbound and outbound SFTP files.
- Preparing files for downstream processing.
- Updating file names as part of an integration workflow.
- Automating SFTP repository maintenance.
- Managing files exchanged with external systems.
Inputs
- Select SFTP – The Select SFTP property specifies the configured SFTP connection to use for the file-renaming operation.
- File Path – The Relative path of file to be renamed property specifies the relative path of the existing file on the SFTP server.
- Rename File To – The Rename file to property specifies the new name for the file.
Returns
- True – The True return path represents a successful result from the file-renaming operation.
- False – The False return path represents an unsuccessful result.
Usage:
The Rename File step is typically used when a workflow needs to rename an existing file on an SFTP server.
Renaming can be useful when file names represent workflow states. For example, an incoming file can be renamed after it has been successfully processed to distinguish it from files that are still awaiting processing.
The file path and new name can be supplied as workflow values, allowing the workflow to determine the target dynamically.
Typical uses include:
- Marking files as processed.
- Renaming files after successful validation.
- Changing file names based on workflow status.
- Organizing inbound and outbound SFTP content.
- Preparing files for downstream systems.
- Managing file-processing states.
- Automating SFTP repository organization.

To use this step, configure SFTP in FlowWright's SFTP Connections.

A sample connection configuration is provided below for reference.

Typical Workflow Suggestions:
Mark a File as Processed
Rename an inbound file after it has been successfully processed.
Example:
Receive File → Validate File → Process File → Rename File → Complete
For example, customer_report.csv could be renamed to customer_report_processed.csv.
Processing-State Management
Use file names to represent workflow processing states.
Example:
Receive File → Process → Rename File → Processed
This provides a simple file-level indication that processing has occurred.
File Validation
Rename a file after successful validation.
Example:
Receive File → Validate → Rename File → Continue Processing
A naming convention can distinguish validated files from files awaiting validation.
File Transfer Completion
Rename a file after successfully transferring or processing its contents.
Example:
Receive File → Process → Transfer → Rename File → Complete
External System Integration
Use the step when an external system expects a particular file name after processing.
Example:
Generate File → Validate → Rename File → Send to External System
Batch Processing
Rename files after each file in a batch has been processed.
Example:
Identify Batch → Process File → Rename File → Record Result
Archive Preparation
Rename files before an archival process.
Example:
Complete Processing → Rename File → Archive
A new name can indicate that processing has been completed.
Customer File Management
Rename customer-specific files after they have been processed.
Example:
Receive Customer File → Process → Rename File → Notify Customer
Dynamic File Naming
Use workflow values to determine the file path and new file name.
Example:
Determine Customer → Generate File → Rename File → Continue
The XML defines both the existing file path and new file name as string properties, allowing workflow values to be supplied to the operation.
Failure Handling
Use the False return path to handle an unsuccessful rename.
Example:
Rename File → True → Complete
↳ False → Log Failure / Retry / Notify Administrator
The step explicitly provides True and False return values.
Example:
Let’s build and execute the “sftpRenameFileDef” example.
- Create a new definition called “sftpRenameFileDef” and open the definition in designer mode.
- Drag an “sftpRenameFile” step to the canvas.
- Connect the dots between the “Start” and “sftpRenameFile” 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 “sftpRenameFile” step to configure its “Required” properties. Provide a name for the step. Select the “SFTP” connection string from the dropdown. Provide the relative file path to rename. Provide the new file name. Click the Save button. Note: Click the "AI Predict" button to have the Copilot add new process steps that match your process description.

- 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. Click the process step to view its properties. When the workflow reaches the Rename File step, FlowWright uses the selected SFTP connection to identify the file at the configured relative path and rename it using the specified new name. The workflow then follows the True or False return path according to the result.
Tips:
- Select the correct configured SFTP connection.
- Verify that the selected connection points to the intended SFTP server.
- Ensure that the target file exists before the step executes.
- Carefully verify the Relative path of the file to be renamed.
- Use workflow Variables when the file path needs to be determined dynamically.
- Provide an appropriate value for Rename file to.
- Verify that the new file name follows the naming conventions of the target SFTP repository.
- Ensure that the SFTP connection has sufficient permissions to rename the file.
- Test the operation with representative files before deploying the workflow.
- Test both the True and False paths.
- Consider adding logging or notification to the False path.
- Consider retry or exception-handling logic when the SFTP server may be temporarily unavailable.
- Avoid hard-coding environment-specific file paths when deploying workflows across environments.
- Be careful when dynamically constructing file paths or names.
- Verify the expected behavior of the
renameTovalue in the target environment, since the XML does not document whether it should contain only a file name or a complete path. - Use consistent naming conventions for file names that represent processing states.
- Ensure that downstream systems are aware of the new file name when they depend on a specific file name.
- Verify that renaming the file does not interfere with another process that is monitoring the original file path.
Notes:
The Rename File step is defined in the SFTP category with the internal name sftprenamefile, label Rename file in SFTP server, and display name Rename File.
The step is implemented by FlowWright.Workflow.SFTPRenameFile in FlowWright.Workflow.dll and is a Process step with 2 incoming connections and 2 outgoing connections.
The XML defines three configurable properties, all of which are marked as required.
The Select SFTP property uses the ClsSFTPConnections data type, implemented by FlowWright.DataTypes.ClsSFTPConnections.
The filePath and renameTo properties use the standard string data type, implemented by FlowWright.DataTypes.ClsTextBox.
The step provides two predefined return values: False and True.
Definition Sample:
You may download the sample definition(s) from the link provided and import them into your FlowWright Process Definition.
Note: Verify and complete any missing configuration after importing the sample, including:
- SFTP connection
- Existing file relative path
- New file name
- Environment-specific SFTP settings
- Downstream True and False workflow paths
Because file names may be used by downstream systems to identify processing state, carefully verify the new file name before executing the imported definition.
After verifying the configuration, save the Process Definition before execution.
Click here to download the sample file.