Skip to content

Latest commit

 

History

History
46 lines (30 loc) · 1.13 KB

RemoveDirectory.md

File metadata and controls

46 lines (30 loc) · 1.13 KB

Home

Function name : RemoveDirectory

Group: File Management - Library: kernel32


The RemoveDirectory function deletes an existing empty directory. To recursively delete files and subdirectories in a directory, use the SHFileOperation function.


Declaration:

BOOL RemoveDirectory(
  LPCTSTR lpPathName   // directory name
);  

FoxPro declaration:

DECLARE INTEGER RemoveDirectory IN kernel32;
	STRING lpPathName  

Parameters:

lpPathName [in] Pointer to a null-terminated string that specifies the path 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:

If the function succeeds, the return value is nonzero


Comments:

To recursively delete the files in a directory, use the SHFileOperation function.

See also: RemoveDirectoryTransacted.