Delete Command: delete
The Delete command permanently removes a specified file from a folder within an automation workflow. This helps users manage storage space, remove outdated files, and ensure that unnecessary or sensitive data is deleted when no longer needed.
Example: Suppose you want to delete a file named OldData.txt from the C:\Temp folder.
Steps to configure:
- Select Set a Variable Value from the Action dropdown.
- Enter a variable name in Element Key (e.g., DeleteStatus). This variable will store the result of the Case execution (True if the file gets deleted or False otherwise).
- Click on Form, select Functions, and choose File Handler Functions.
- In the Cmd field, select Delete and provide:
- File: Specify the full path of the file to be deleted (e.g., C:\Temp\OldData.txt).


Outcome on execution:
- If the file is successfully deleted, the command returns true in the variable defined in the Element Key.
- If the operation fails (e.g., file not found or permission denied), it returns false.
- This variable can be used in later steps of your automation process to reference the stored information using the syntax ${VariableName} (e.g., ${DeleteStatus}).