RemoveDirectory (Windows CE 5.0)

Send Feedback

This function deletes an existing empty directory. A RAPI version of this function exists, called CeRemoveDirectory (RAPI).



  • 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 Values

Nonzero indicates success. Zero indicates failure. To get extended error information, call GetLastError.


RemoveDirectory only operates on empty directories. If the directory is not empty, an application must first use FindFirstFile, FindNextFile, RemoveDirectory and DeleteFile to recursively enumerate and delete the files and subdirectories inside the directory.


OS Versions: Windows CE 1.0 and later.
Header: Winbase.h.
Link Library: Coredll.lib.

See Also

CeRemoveDirectory (RAPI) | CreateDirectory

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.