Skip to main content
Version: 1.28 (Current)

Delete File

Audience: Business Users

Skill Prerequisites: Tokens

Deletes one or more files. To delete several files at once, separate their identifiers with commas (,) or semicolons (;).

danger

Deleting is permanent. Files removed by this action can't be recovered from Plant an App.

Typical Use Cases​

  • Remove a temporary file after it has been emailed, uploaded to FTP or stored in a database
  • Remove the previous file when a user uploads a replacement
  • Delete a record's attachments when the record is deleted
  • Move a file, by copying it with Copy File and then deleting the original

Don't use it to​

  • Delete a folder and everything in it. Use Delete Folder with Recursive checked instead.
Action NameDescription
Delete FolderDeletes a folder, optionally with all its contents.
Copy FileCopies a file into another folder.

Input Parameter Reference​

ParameterDescriptionSupports TokensDefaultRequired
IdentifierThe file or files to delete. Each identifier can be a file ID (77), a path relative to the portal root (Images/Cars/Ford.jpg), a path that includes the portal folder (Portals/0/Images/Cars/Ford.jpg), an absolute or LinkClick URL of a file on the site, or a physical path inside the portal folder. Separate multiple identifiers with , or ;.Yesempty stringYes

Considerations​

  • Missing files don't cause errors. If a file can't be found, it's skipped and the action carries on with the next identifier.
  • Files outside the file system. If a file exists on disk but isn't registered in the site's file system, the action deletes it from disk directly, as long as it's inside the portal folder. Files outside the portal folder are never deleted.
  • Errors stop the whole action. If deleting one file fails, for example because the file is locked, the action stops with an error and the remaining identifiers aren't processed.
  • File names that contain commas or semicolons can't be deleted by path. Use the file ID instead.

Examples​

tip

To understand how to use the below examples, please see Running Examples.

1. Delete a generated file after emailing it​

This action deletes the file whose ID is stored in the Report token, for example a PDF created earlier by Generate PDF and attached to an email.

{
"Title": "Delete File",
"ActionType": "DeleteFile",
"Description": "Remove the temporary report",
"Condition": null,
"Parameters": {
"Identifier": "[Report]"
}
}

2. Delete several files at once​

This action deletes two files by path and one by ID.

{
"Title": "Delete File",
"ActionType": "DeleteFile",
"Description": "Remove old exports",
"Condition": null,
"Parameters": {
"Identifier": "Exports/customers.csv;Exports/orders.csv;1042"
}
}

Revised 09/25/2026