Skip to main content
Version: 1.28 (Current)

Delete Folder

Audience: Business Users

Skill 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​

Action NameDescription
Delete FileDeletes one or more files.
Get or Create FolderCreates a folder.
Move FolderMoves a folder, for example to an archive folder instead of deleting it.

Input Parameter Reference​

ParameterDescriptionSupports TokensDefaultRequired
IdentifierThe 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.Yesempty stringYes
RecursiveWhen 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.NoUncheckedNo
Ignore errorsWhen checked, errors are written to the site's event log and the remaining actions keep running. When unchecked, an error stops execution.NoUncheckedNo

Considerations​

  • Missing folders don't cause errors. If the folder doesn't exist, the action finishes without doing anything, even when Ignore errors is 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 Identifier resolves to an empty value, a path such as Clients/[Company]/ becomes Clients//, which is treated as the Clients folder. 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