Delete Folder
Deletes the folder at `path`. If `recursive` is false, the folder must already be empty. This is a filesystem write operation and depends on filesystem write permissions. `reason` is optional review text shown in delete confirmation prompts. Recursive deletes are denied for protected broad targets such as filesystem roots, the user's home folder, and top-level user folders. `onError: CONTINUE` makes cleanup best-effort: delete failures are skipped and the script continues.
Inputs
| Input | Required | Value Kind | Types | Enum Values |
|---|---|---|---|---|
path | yes | expression | string | — |
recursive | no | expression | — | — |
reason | no | expression | — | — |
onError | no | expression | enum-string | STOP, CONTINUE, RETURN_FALSE |
Notes
- Filesystem write statement that deletes a folder.
- Requires the folder to be empty unless
recursive=true. - Optional
reasonis shown in delete confirmation prompts so users can review why the workflow is deleting the target. - Recursive deletes are denied for protected broad targets such as filesystem roots, the user's home folder, and top-level user folders.
- Use
onError: CONTINUEfor best-effort cleanup where a denied, canceled, or unavailable delete confirmation should leave artifacts in place and let the workflow finish.
Examples
Render Active-Sequence Frames At Equal Distances To Fixed Folder
Exports a small evenly spaced set of `.png` frames across the active sequence to a fixed folder path, so visual timeline sampling can be runtime-validated deterministically.
Topics: frame export, visual probing, timeline sampling, runtime validation
Source: patterns/ex-sequence-render-active-sequence-frames-equal-distances-fixed-folder.json