DirectoryDelete Procedure |
Version 6 |
Deletes a directory. Optionally it also deletes all lower level files and directories.
[ bRet = ] DirectoryDelete ( sDirPath, [bDeleteContents] )
The DirectoryDelete procedure syntax has the following parts:
|
Name |
Type |
Description |
|
bRet |
Bool |
True if successful; False otherwise |
|
sDirPath |
Val BString |
Name of directory to delete |
|
bDeleteContents |
Val Bool |
If True, all lower level files and intervening directories will be deleted as well. By default, it is False. |
If the optional flag is false, then the directory to be deleted mush be empty.
The following example deletes the backup directory only:
! delete backup directory if empty
bRet=DirectoryDelete("c:\\logfiles\\TestExec\\Backup")