WolframLang: Delete Dir

By Xah Lee. Date: .

Delete Directory

DeleteDirectory returns Null if it succeeds in deleting a directory, and $Failed if it fails.

DeleteDirectory

(* delete a dir only if empty *)
DeleteDirectory["c:/Users/x09908"]
(* delete a dir and all its files and subdirs *)
DeleteDirectory["c:/Users/x09908",DeleteContents->True]

WolframLang, Shell Tasks