dos12.hlp (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
DosRmDir (1.2)
Function Group  Overview                          Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
#define INCL_DOSFILEMGR
 
USHORT DosRmDir(pszDirName, ulReserved)
PSZ pszDirName;      /* directory name */
ULONG ulReserved;    /* must be zero   */
 
The DosRmDir function removes the specified directory. The directory must be
empty before it can be removed; that is, it must not contain files of any
kind, including hidden files and other directories. If the specified
directory cannot be found or is not empty, DosRmDir returns an error.
 
The DosRmDir function is a family API function.
 
Parameter   Description
────────────────────────────────────────────────────────────────────────────
 
pszDirName  Points to a null-terminated string that specifies the directory
            to be removed. This string must be a valid MS OS/2 directory
            name, and cannot contain any wildcard characters.
 
ulReserved  Specifies a reserved value; must be zero.
 
Return Value
 
The return value is zero if the function is successful. Otherwise, it is an
error value, which may be one of the following:
 
     ERROR_ACCESS_DENIED
     ERROR_CURRENT_DIRECTORY
     ERROR_DRIVE_LOCKED
     ERROR_FILE_NOT_FOUND
     ERROR_NOT_DOS_DISK
     ERROR_PATH_NOT_FOUND
 
Comments
 
The DosRmDir function cannot remove the current directory or the root
directory.
 
If necessary, use the DosDelete function to remove files from the
directory.
 
See Also
 
DosChDir, DosDelete, DosMkDir