RemoveDirectory - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


FileTools

  

RemoveDirectory

  

remove a directory

 

Calling Sequence

Parameters

Returns

Options

Description

Notes

Examples

Compatibility

Calling Sequence

RemoveDirectory(dirName, options)

Parameters

dirName

-

string ; directory name to be removed

options

-

(optional) equation(s) of the form name = value

Returns

• 

none

Options

• 

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.

Description

• 

The RemoveDirectory command removes a directory

Notes

• 

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!

Examples

mkdirmydir

mkdirmydir/subdir

FileTools:-Text:-WriteLinemydir/subdir/testfile,this is a test

15

(1)

FileTools:-Text:-Closemydir/subdir/testfile

FileTools:-RemoveDirectorymydir,recurse=true,forceremove=true

FileTools:-Existsmydir

false

(2)

Compatibility

• 

The FileTools[RemoveDirectory] command was introduced in Maple 16.

• 

For more information on Maple 16 changes, see Updates in Maple 16.

See Also

FileTools

FileTools[IsDirectory]

FileTools[ListDirectory]