Delete Folder
Audience:
Business UsersSkill Prerequisites:
Tokens
Deletes a folder from the site's file system. With Recursive checked, all the folder's files and subfolders are deleted too.
danger
Deleting is permanent. Files and folders removed by this action can't be recovered from Plant an App.
Typical Use Cases
- Remove temporary working folders after a process finishes, for example after files have been zipped with Pack folder
- Delete a record's folder when the record itself is deleted
- Scheduled clean-up of old export folders
Don't use it to
- Delete individual files. Use Delete File instead.
- Empty a folder but keep it. Delete it and create it again with Get or Create Folder.
Related Actions
| Action Name | Description |
|---|---|
| Delete File | Deletes one or more files. |
| Get or Create Folder | Creates a folder. |
| Move Folder | Moves a folder, for example to an archive folder instead of deleting it. |
Input Parameter Reference
| Parameter | Description | Supports Tokens | Default | Required |
|---|---|---|---|---|
| Identifier | The folder to delete. It can be a folder ID (77), a path relative to the portal root (Images/Cars/) or a path that includes the portal folder (Portals/0/Images/Cars/). The portal root can't be deleted: an empty value or / makes the action fail. | Yes | empty string | Yes |
| Recursive | When checked, all subfolders and files inside the folder are deleted first, including files that exist on disk but were never synchronized into the file system. When unchecked, deleting a folder that isn't empty fails. | No | Unchecked | No |
| Ignore errors | When checked, errors are written to the site's event log and the remaining actions keep running. When unchecked, an error stops execution. | No | Unchecked | No |
Considerations
- Missing folders don't cause errors. If the folder doesn't exist, the action finishes without doing anything, even when
Ignore errorsis unchecked. - Folders outside the file system. If the folder 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.
- Watch your tokens. If a token in
Identifierresolves to an empty value, a path such asClients/[Company]/becomesClients//, which is treated as theClientsfolder. Use a condition to check the token has a value before running the action.
Examples
tip
To understand how to use the below examples, please see Running Examples.
1. Delete a temporary folder and everything in it
This action deletes the folder Temp/Export-<ExportId>/ and all its contents. Because the folder name has a fixed Export- prefix, an empty ExportId token can never point the action at the parent Temp folder.
{
"Title": "Delete Folder",
"ActionType": "DeleteFolder",
"Description": "Clean up the export folder",
"Condition": null,
"Parameters": {
"Identifier": "Temp/Export-[ExportId]/",
"Recursive": true,
"IgnoreErrors": false
}
}
Revised 09/25/2026