Wolfram Language & System 11.0 (2016)|Legacy Documentation
This is documentation for an earlier version of the Wolfram Language.View current documentation (Version 11.2)
deletes the specified directory.
- 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 1991
(2.0)| Updated in 2016