Hey,
I know how to search for files using findfirst() and findnext(). But that only works for files. How can I search for Directories using C++? I would be grateful to anybody who can help me out on this one.
Printable View
Hey,
I know how to search for files using findfirst() and findnext(). But that only works for files. How can I search for Directories using C++? I would be grateful to anybody who can help me out on this one.
Check out this page .
You need to use FindFirstFile() and FindNextFile() and you can figure out if it's a directory like this :
Code:if( win32FindData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) //not extension
{
// directory
}