Ask AI
Skip to main content

Delete a file from an ftp

Function: Delete a file from an FTP

This action allows you to remove a specific file from an FTP server that you have previously connected to using the 'Connect to FTP' action. It's useful for cleaning up old files, managing storage, or removing temporary data from your server.

Input

  • File: The specific file you wish to delete from the connected FTP server. This input is required.

Output

  • The status: This will tell you if the deletion was successful. It will show 'SUCCESS' if the file was removed, or 'CONNECTION_FAILED' if there was an issue connecting to the FTP server during the deletion process.

Execution Flow

Real-Life Examples

  1. Scenario: Cleaning up daily reports You have a process that uploads daily sales reports to your FTP server. After a week, you want to automatically delete the oldest report to save space.

    • Inputs:
      • File: sales_report_2023-10-26.csv (the specific file you want to remove)
    • Result: The sales_report_2023-10-26.csv file is successfully removed from your FTP server. The output The status will be 'SUCCESS'.
  2. Scenario: Removing an outdated product image Your e-commerce website stores product images on an FTP server. A product's image has been updated, and you need to remove the old version.

    • Inputs:
      • File: product_A_old_version.jpg (the image file that is no longer needed)
    • Result: The product_A_old_version.jpg file is deleted from the FTP server. The output The status will be 'SUCCESS'.
  3. Scenario: Attempting to delete from an unreachable FTP server You've configured an action to delete temporary log files from an FTP server, but the server's network connection is currently down.

    • Inputs:
      • File: temp_logs_2023-11-01.zip (the log file you intend to delete)
    • Result: The system attempts to connect to the FTP server to delete the file, but fails due to the network issue. The output The status will be 'CONNECTION_FAILED'. The file remains on the FTP server until the connection is restored and the action is re-run.