HB_DirDelete

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

DirRemove(), MakeDir(), DirChange(), Ferror()

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s