deletes the specified directory.
Details and Options
- DeleteDirectory["dir",DeleteContents->True] deletes dir and all files and directories that it contains.
- DeleteDirectory["dir"] deletes the directory dir only if it contains no files.
- DeleteDirectory[File["dir"],…] is also supported.
- DeleteDirectory returns Null if it succeeds in deleting a directory, and $Failed if it fails.
Introduced in 1991Updated in 2016