RemoveDirectory

  BOOL RemoveDirectory(lpszDir)    
  LPTSTR lpszDir; /* directory to remove */

The RemoveDirectory function deletes an existing empty directory.

Parameters

lpszDir

Points to a null-terminated string that specifies the path name of the directory to be removed. The path must specify an empty directory, and the calling process must have delete access to the directory.

Return Value

The return value is TRUE if the function was successful, or FALSE if an error occurred. Use the GetLastError function to obtain extended error information.

Comment

The RemoveDirectory function may be used as either a wide-character function (where text arguments must use Unicode) or an ANSI function (where text arguments must use characters from the Windows 3.x character set installed).

See Also

CreateDirectory