Move File

Use this step to move a file from one directory to another.

Last published at: March 31st, 2026

moveFile Step

Description:

The Move File workflow step moves a file from its current location to a specified destination directory. The step can optionally overwrite a file at the destination and can store the resulting new file path in a Variable or Global variable.

The step supports:

  • Specifying the destination directory.
  • Specifying the file to move.
  • Controlling whether it can overwrite an existing destination file.
  • Storing the new file path in a Variable or Global variable.
  • Returning a True or False result for subsequent workflow processing.

 

Inputs

  • moveToDirectory – Specifies the destination directory for the file.
  • Overwrite files on destination – Specifies whether files at the destination can be overwritten.
  • overwrite – Specifies the path of the file to be moved.
  • Variable/Global to store new file path – Specifies the Variable or Global variable in which the new file path is stored.
 

 

Returns

  • True – The True return path can be connected to the next workflow activity when the file-move operation completes successfully.
  • False – The False return path can be used for error handling or an alternative workflow path when the operation does not succeed.
 

 

Usage:

The Move File step is typically placed after a workflow creates, receives, processes, or otherwise identifies a file that needs to be relocated.

The workflow supplies the source file path and destination directory. The step can also be configured to overwrite a destination file and store the new file path in a Variable or Global variable.

A typical workflow pattern is:

Create/Receive File → Move File → Use New File Location

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

  • Process the moved file.
  • Read the file from its new location.
  • Send or upload the file.
  • Archive the file.
  • Record the new location.
  • Perform additional file operations.

 

 

Typical Workflow Suggestions:

Organize Incoming Files

Use the step to move files from an incoming directory into a directory used for processing.

Example:

Receive File → Move File → Process File

For example, you can move an incoming file from an intake directory to a processing directory before subsequent activities operate on it.

 

Move Processed Files to an Archive

Use the step after processing is complete to move a file into an archive directory.

Example:

Process File → Move File → Complete

This provides a simple file-lifecycle pattern that separates the original working location from the archive location.

 

Move Files Between Workflow Directories

Use the step when different workflow stages use different file-system directories.

Example:

Create File → Move File → Next Processing Stage

The destination directory can identify the directory associated with the next stage.

 

Organize Files by Processing Status

Use separate directories to represent different processing stages.

Example:

Incoming → Move File → In Process → Move File → Completed

Use the Move File step at each transition to relocate the file to the appropriate directory.

 

Move Files After Successful Processing

Use the step as a cleanup or lifecycle operation after a file has been successfully processed.

Example:

Read File → Process File → Move File → Complete

This keeps the active processing directory limited to files that still need attention.

 

Move Failed Files to an Exception Directory

Use the step on an error-handling path to move a problematic file to a separate location.

Example:

Process File → Error → Move File → Exception Handling

This helps separate files needing investigation from normally processed files.

 

Move Generated Reports

Use the step to relocate a generated report from a working directory to a designated report directory.

Example:

Generate Report → Move File → Publish/Send Report

The destination directory can provide a consistent location for generated output.

 

Move Files for Integration Processing

Use the step to place a file into a directory monitored by another application or workflow.

Example:

Generate File → Move File → Integration Directory → External Processing

The Move File step can act as the transition between the workflow's working directory and the directory used by the downstream process.

 

Overwrite an Existing Destination File

Enable Overwrite files on destination when the workflow is designed to replace an existing file at the destination. The XML explicitly provides this behavior as a configurable checkbox.

Example:

Generate Latest Report → Move File → Overwrite Existing Report

Use this pattern when the destination is intended to contain the latest version of a file.

 

Store the New File Path

Use a Variable/Global to store the new file path when subsequent workflow activities need the moved file's location.

Example:

Move File → Store New Path → Process Moved File

The property is specifically provided for storing the new file path.

 

Build a Dynamic Destination

Use workflow values to determine the destination directory before the Move File step executes.

Example:

Determine Category → Build Destination → Move File → Continue

This lets you route different files to different directories based on workflow logic.

 

Separate Completed and Pending Files

Use directory movement to distinguish files that have completed processing from those still waiting to be processed.

Example:

Process File → Move File to Completed → Record Result

This can provide a simple file-system-based status mechanism.

 

Move Files as Part of a Document Lifecycle

Use the step at different points in a document's lifecycle.

Example:

Receive → Process → Review → Move File → Archive

The workflow can use different directories for different stages.

 

Route the Workflow Based on the Move Result

Use the True and False paths to distinguish successful and unsuccessful move operations.

Example:

Move File
True → Continue Workflow
False → Error Handling

The step provides both return values for workflow branching.

 

Move Multiple Files Sequentially

Use multiple Move File steps when you need to relocate several known files.

Example:

Move File A → Move File B → Move File C → Complete

Each step can have its own source path and destination directory.

 

Example:

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

  • Create a new process definition called “moveFileDef” and open the definition in designer mode. 
  • Drag a “moveFile” step to the canvas. 
  • Define a variable or a global to store the new file path. 
  • Connect the dots between the “Start” step and “moveFile”  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 “moveFile” step to configure its “Required” properties. Name the step, then click Save. Note: Click the "AI Predict" button to have the Copilot add new process steps that match your process description. 

 

  • Click the “moveFile” step to configure its “Advanced” properties. Select “On” to overwrite existing files at the destination. Provide the destination directory path. Provide the source file path. Note: File selection wildcards, such as (*.* / *.doc), are not supported. Provide a variable or global to store the new file path after execution. 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 Move File process step to view its properties. When the workflow reaches the Move File step, FlowWright uses the configured source file path and destination directory. If configured, the step can overwrite a destination file and store the new file path in the specified Variable or Global variable. Inspect the resulting file location and the stored Variable or Global value, where configured. Also verify whether the workflow follows the expected True or False path.

 

Tips:

  • Verify the source file path before executing the step.
  • Verify the destination directory carefully.
  • Use meaningful Variable or Global variable names for the stored new file path.
  • Test the workflow with representative files before deploying it to production.
  • Enable Overwrite files on destination only when you intend to replace an existing destination file. 
  • Consider the consequences of overwriting files when the destination may contain important documents.
  • Use separate directories for incoming, processing, completed, and exception files when this improves workflow organization.
  • When using dynamically constructed paths, verify the resulting source and destination values before the step executes.
  • Make sure preceding workflow activities have completed any required processing before moving the file.
  • Verify the new file path before using it in downstream activities.
  • Connect the False path to appropriate error-handling or recovery logic.
  • Test workflows where the destination file already exists.
  • Test workflows where the source file or destination directory is not available.
  • Avoid relying on unspecified behavior for missing files, inaccessible directories, or invalid paths.
  • Do not assume whether the operation copies and then deletes the original, performs a native move, or uses another implementation internally; the step definition does not specify its implementation details.
  • Do not assume the exact meaning of the True and False results beyond the return values defined by the step unless confirmed by the FlowWright implementation.
  • Do not assume that the stored new-file-path value has any particular formatting beyond its purpose as a path destination.
  • Keep file-system permissions appropriate for the directories the workflow uses.
  • Avoid moving sensitive files into directories where unintended users or processes may access them.

 

Notes:

  • The Move File step is defined in the File System category with the internal name movefile, label “Move a file from one directory to another”, and display name “Move File.”
  • The step is implemented by FlowWright.Workflow.MoveFile in FlowWright.Workflow.dll and is defined as a Process step with 2 incoming connections and 2 outgoing connections.
  • The step defines four properties:
    • moveToDirectory – Directory to move to
    • overwrite – Overwrite files on destination
    • filePath – Path to the file
    • newFilePathVarGlobal – Variable/Global to store new file path 
  • All four properties are marked as not required in the step definition.
  • The Directory to move to, Path to the file, and Variable/Global to store new file path properties use the string data type, implemented by FlowWright.DataTypes.ClsTextBox in FlowWright.DataTypes.dll.
  • The Overwrite files on destination property uses the checkbox data type, implemented by FlowWright.DataTypes.ClsCheckBox in FlowWright.DataTypes.dll
  • The step provides two return values:
    • False
    • True

 

Definition Sample:

You may download the sample definition(s) from the link provided and later import them into your FlowWright Process Definition (XML file) or Form Definition (HTML file) page.

Note: Verify and complete any missing configuration after importing the sample, including:

  • Source file path.
  • Destination directory.
  • Overwrite setting.
  • Variable or Global variable used to store the new file path.
  • Workflow Variable references.
  • Environment-specific directory paths.
  • File-system permissions.
  • Downstream True and False workflow paths.
  • Any preceding logic that determines which file should be moved.

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

Click here to download the sample file.