DirDelete

Deletes a folder.

DirDelete DirName , Recurse

Parameters

DirName

Type: String

Name of the directory to delete, which is assumed to be in A_WorkingDir if an absolute path isn't specified.

Recurse

Type: Boolean

If omitted, it defaults to false.

If false, files and subdirectories contained in DirName are not removed. In this case, if DirName is not empty, no action is taken and an exception is thrown.

If true, all files and subdirectories are removed (like the Windows command "rmdir /S").

Error Handling

An exception is thrown if an error occurs.

DirCreate, FileDelete

Examples

Removes the directory, but only if it is empty.

DirDelete "C:\Download Temp"

Removes the directory including its files and subdirectories.

DirDelete "C:\Download Temp", true