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: Integer (boolean)

This parameter determines whether to recurse into subdirectories. If omitted, it defaults to 0 (false). Specify one of the following values:

0 (false): Do not remove files and sub-directories contained in DirName. In this case, if DirName is not empty, no action is taken and an exception is thrown.

1 (true): Remove all files and subdirectories (like the Windows command "rmdir /S").

Error Handling

An exception is thrown if an error occurs.

Remarks

None

Related

DirCreate, FileDelete

Examples

#1

DirDelete "C:\Download Temp"
DirDelete "C:\Download Temp", 1