FileTools
RemoveDirectory
remove a directory
Calling Sequence
Parameters
Returns
Options
Description
Notes
Examples
Compatibility
RemoveDirectory(dirName, options)
dirName
-
string ; directory name to be removed
options
(optional) equation(s) of the form name = value
none
recurse=true or false
Specifies whether the directory removal should be carried out recursively. If recurse=false, then the RemoveDirectory command can only remove an empty directory. Default is false.
forceremove=true or false
Specifies whether the directory removal should be forced. If forceremove=false, then the RemoveDirectory command will display a dialog which queries the user about whether the directory should be removed. Default is false.
The RemoveDirectory command removes a directory
Symbolic links to directories are treated and removed as files. (That is, no recursion is carried into the link target directory.)
dirName is not allowed to be "." or ".."
If used carelessly, this command could cause loss of important data. Please use with care!
mkdir⁡mydir
mkdir⁡mydir/subdir
FileTools:-Text:-WriteLine⁡mydir/subdir/testfile,this is a test
15
FileTools:-Text:-Close⁡mydir/subdir/testfile
FileTools:-RemoveDirectory⁡mydir,recurse=true,forceremove=true
FileTools:-Exists⁡mydir
false
The FileTools[RemoveDirectory] command was introduced in Maple 16.
For more information on Maple 16 changes, see Updates in Maple 16.
See Also
FileTools[IsDirectory]
FileTools[ListDirectory]
Download Help Document