HB_DirDelete
Attempt to remove a directory
Syntax
HB_DirDelete( <cDirectory> ) --> nError
Arguments
<cDirectory> The name of the directory to delete
Returns
<nError> 0 if directory was successfully removed, otherwise the number of the last DOS error.
Most probable error codes :
Code Meaning ---- ---------------------------- 2 File ( directory ) not found 145 Directory not empty
Description
This function attempt to remove the specified directory in <cDirectory>. If this function fails, it will return the last OS error code number. See FERROR() function for the description of the error.
Notes
. This function is file/folder names case sensitive
. <cDirectory> must be empty
. HB_DirDelete()is same as DirRemove() C5.3 function, but it’s always available, not just when HB_COMPAT_C53 is enabled.
Examples
cDir := ".\backup" IF HB_DirDelete( cDir ) == 0 ? "Remove of directory", cDir, "was successfull" ENDIF
Seealso