Move File

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

Last published at: February 24th, 2025

moveFile Step

Description:

This step moves a file from one directory path to another on the application server.

 

Inputs

  • moveToDirectory – full path for the directory on the server
  • filePath – full path to the file on the server
  • overwrite – overwrite file on destination
  • newFilePathVarGlobal – Variable/Global to store new file path
 

 

Returns

  • True – step executed successfully
  • False – step failed to execute 
 

 

Usage:

 

 

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. 
  • Click the “moveFile” step to configure its “Required” properties. Provide a name for the step. Click the Save button. Note: Click the "AI Predict" button for the Copilot to add new process steps that match your process description. 

 

  • Click the “moveFile” step to configure its “Advanced” properties. Select “On” to overwrite the files (if existing) on the destination. Provide a directory file path to move to. Provide the source file path info. 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” setting configuration is necessary for documentation and also measures the workflow progress and the 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 then execute it. The process step should move a file from one directory to another within the app server, and the new file path is stored in the variable newFilePath as configured.

 

Definition Sample:

You may download the sample definition(s) from the link here and later import them (drag-and-drop) to your FlowWright Process Definition (XML file) or Form Definition (HTML file) page. 

Note: Please verify and complete the process steps for any missing configurations, such as file path references and database connections, after import. Then, save the definition to confirm the changes. 

Click here to download the sample file.