yea. This should do the job:

lite-c code:
Code:
#include <acknex.h>
#include <windows.h>
long WINAPI FindFirstFile(long lpFileName,long lpFindFileData);
long WINAPI FindNextFile(long hFindFile,long lpFindFileData);

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);
}


run it and you will get the idea.

edit: Beware, no error handling in this code. i made it as simple as possbile.

Last edited by Quadraxas; 07/20/08 01:27.

3333333333