you can already do that with winapi.
example lite-c:
#include <acknex.h>
#include <windows.h>
int main(){
WIN32_FIND_DATA ffd;
HANDLE hFind = INVALID_HANDLE_VALUE;
hFind = FindFirstFile("*", &ffd);
while (FindNextFile(hFind, &ffd) != 0)
{
if (ffd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
{
printf(" %s <DIR>\n", ffd.cFileName);
}
}
FindClose(hFind);
}
note: this line:
FindFirstFile("c:\*", &ffd);
change c:\* to something else.(your spesific folder)
putting a * alone will list folders in current directory.
edit: apperantly findfirstfile take relative path, sorry for my mistake.