ftpDeleteFile Step

Use this feature to delete a specified file from an FTP server using a configured FTP connection and file path.

Last published at: September 21st, 2026

Description:

The FTPDeleteFile workflow step deletes a specified file from an FTP server using the selected FTP connection and file path.

The step supports:

  • Selecting a configured FTP connection.
  • Specifying the file path to delete on the FTP server.
  • Removing files from FTP locations as part of a workflow.
  • Using workflow Variables or Globals in the file path when supported by the configured property.
  • Continuing the workflow through a True return path when the operation succeeds.
  • Handling an unsuccessful operation through the False return path.

 

Inputs

  • ftpConnection – The ftpConnection property specifies the FTP connection to use when accessing the FTP server.
  • filePath – The filePath property specifies the path of the file that should be deleted from the FTP server.
 

 

Returns

  • True – The True return path can be connected to the next workflow activity after the FTP file deletion operation succeeds.
  • False – The False return path can be used for error handling or an alternative workflow path if the file deletion operation does not succeed.
 

 

Usage:

The FTPDeleteFile step is typically placed after a workflow has finished using, transferring, or processing a file stored on an FTP server.

The workflow identifies the FTP connection and the file to remove. The FTPDeleteFile step then performs the deletion operation.

A typical workflow pattern is:

Process File → FTPDeleteFile → Continue Process

The step can be used by later workflow activities to:

  • Continue processing after a file is deleted.
  • Perform FTP directory cleanup.
  • Remove temporary files.
  • Clean up files after successful transfer.
  • Remove processed files.
  • Maintain FTP folder contents.
  • Handle unsuccessful deletion through an alternate path.
  • Complete an FTP-based integration workflow.

The workflow can also connect the False return path to an error-handling or notification step when the file cannot be deleted.

 

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

 

A sample FTP connection configuration is provided here for reference.

 

Typical Workflow Suggestions:

Delete a File After Successful Processing

Use the step to remove an FTP file after the workflow has successfully processed it.

Example:

FTPGetFile → Process File → FTPDeleteFile → Complete

This pattern can be useful when the FTP location contains files that should be removed after successful processing.

 

Clean Up Files After Download

Use FTPDeleteFile after an FTP download operation when the source file should no longer remain on the FTP server.

Example:

FTPGetFile → Validate File → Process File → FTPDeleteFile

The file can be downloaded and processed before the workflow attempts to remove the original FTP file.

 

Remove Temporary FTP Files

Use the step to remove temporary files created or placed on an FTP server during an integration process.

Example:

Create/Upload Temporary File → External Processing → FTPDeleteFile → Continue

This can help keep temporary integration files from remaining in the FTP location after processing.

 

Post-Processing Cleanup

Use FTPDeleteFile as a cleanup activity after a downstream operation has completed.

Example:

Retrieve FTP File → Transform Data → Send Data → FTPDeleteFile

The deletion occurs after the workflow completes the required processing activities.

 

Clean Up Successfully Processed Files

A workflow can use the True path to distinguish successful deletion from an unsuccessful operation.

Example:

Process FTP File → FTPDeleteFile

True → Log Completion / Continue

False → Log Error / Notify Administrator

This provides separate workflow paths for the two return values exposed by the step.

 

Maintain an FTP Processing Folder

Use FTPDeleteFile as part of a recurring file-processing workflow.

Example:

Check FTP Folder → Get File → Process File → FTPDeleteFile → Get Next File

Use this pattern when files are processed individually and should be removed after successful processing.

 

Remove Files After Integration

Use the step after an external system has successfully received or processed the FTP file.

Example:

Prepare File → FTPSendFile → Confirm Processing → FTPDeleteFile

This can help prevent already processed files from remaining in the FTP location.

 

Handle File Deletion Failures

Connect the False return path to an appropriate error-handling activity.

Example:

Process File → FTPDeleteFile

True → Complete

False → Log Error → Notify Administrator

This lets the workflow distinguish between normal and alternative processing paths.

 

Use Environment-Specific FTP Connections

Use the Select FTP property to identify the configured FTP connection appropriate for the workflow environment.

Example:

Process File → FTPDeleteFile

The workflow can use the configured FTP connection while the file path identifies the file to be deleted.

The XML confirms that the FTP connection is represented by the ClsFTPConnections data type; environment-specific connection behavior should be verified against the FlowWright configuration.

 

Clean Up Files at the End of an Integration Workflow

Use FTPDeleteFile as the final file-management operation after all required processing is complete.

Example:

Get FTP File → Validate → Transform → Send to Application → FTPDeleteFile → Complete

This pattern can help keep the FTP location limited to files that still require processing.

 

Conditional Cleanup

Place FTPDeleteFile on a path that represents successful completion of the preceding processing.

Example:

Process File → Validation

Valid → FTPDeleteFile → Complete

Invalid → Error Handling

This prevents the deletion activity from running on an invalid-file path.

 

Example:

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

  • Create a new process definition named “ftpDeleteFileDef” and open it in designer mode. 
  • Drag an “ftpDeleteFile” step to the canvas.
  • Connect the dots between the “Start” and “ftpDeleteFile” 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, you can configure additional values.
  • Define a variable or a global to hold the FTP file path.  
  • Click the “ftpDeleteFile” step to configure its “Required” properties. Provide a name for the step. Select the FTP connection from the drop-down list. Enter the file path or a variable reference containing the file path to delete. 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. Configure the step state and percent fields individually, as shown 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 FTPDeleteFile step, FlowWright uses the selected FTP connection and the configured file path to perform the deletion. The workflow then follows the True or False return path according to the result of the operation. The XML explicitly defines these two return values

 

Tips:

  • Verify that the configured FTP connection points to the intended FTP server.
  • Verify the file path before executing the workflow.
  • Test the workflow with a non-critical file before using it for production cleanup.
  • Use meaningful step names that identify the purpose of the deletion.
  • Confirm that the workflow has completed all required processing before deleting the source file.
  • Consider connecting the False return path to appropriate error handling.
  • Log the file being deleted when traceability is important.
  • Verify that the configured FTP account has the required permissions for the operation.
  • Test the workflow when the specified file exists.
  • Test the workflow when the specified file does not exist.
  • Test the workflow when the FTP server or connection is unavailable.
  • Test the workflow with representative FTP paths.
  • Use environment-appropriate FTP connections when moving the workflow between environments.
  • Avoid deleting files before downstream activities have finished using them.
  • Consider whether a file should be archived or retained before deleting it.
  • Verify the resulting FTP folder contents after execution.
  • Do not assume recursive deletion, wildcard deletion, or deletion of directories; the XML defines this step as deleting a file, not a folder. 
  • Do not assume specific behavior for missing files, permission failures, connection failures, path normalization, or retry handling unless confirmed by the FlowWright implementation.
  • Test the True and False paths independently so that error handling behaves as expected.

 

Definition Sample:

You may download the sample definition from the link provided and later import it 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:

  • FTP connection.
  • File path.
  • Workflow Variable references, if used.
  • Environment-specific FTP settings.
  • Downstream True and False workflow paths.
  • Error-handling configuration.
  • Any required FTP permissions.

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

Click here to download the sample file.