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.
BOOL RemoveDirectory(
LPCTSTR lpPathName // directory name
);
DECLARE INTEGER RemoveDirectory IN kernel32;
STRING lpPathName
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
If the function succeeds, the return value is nonzero
To recursively delete the files in a directory, use the SHFileOperation function.
See also: RemoveDirectoryTransacted.