Skip to main content

Delete Directory

Recursively delete a directory and all its contents. Missing paths are ignored by default (safe to call on a directory that may not exist). Enable 'Fail if missing' for audit-sensitive flows that must error when the path is absent. Refuses unsafe root paths (empty, /, , ., .., ~, drive roots like C:). Prefer this over RunPython('shutil.rmtree(...)') for temp-dir cleanup at the start or end of a workflow.

Category: File & Folder Operations · Group: Files · Activity name: DeleteDirectory

The DeleteDirectory activity in the designer

Example

DeleteDirectory("<path>", failIfMissing=False)

Inputs

NameTypeRequiredDefaultDescription
Directory PathstringYesThe absolute path of the directory to delete. All contents are removed recursively.
Fail if missingbooleanFalseWhen enabled, the activity errors if the target directory does not exist. Default: silently skip missing paths.