Skip to main content

Delete Folder

Category: Files Delete Folder block screenshot

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

InputRequiredValue KindTypesEnum Values
pathyesexpressionstring
recursivenoexpression
reasonnoexpression
onErrornoexpressionenum-stringSTOP, CONTINUE, RETURN_FALSE

Notes

  • Filesystem write statement that deletes a folder.
  • Requires the folder to be empty unless recursive=true.
  • Optional reason is 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: CONTINUE for 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.

kind: Pattern · format: runtime-dsl · validation: MCP fixture

Topics: frame export, visual probing, timeline sampling, runtime validation

Source: patterns/ex-sequence-render-active-sequence-frames-equal-distances-fixed-folder.json

Download JSON