opening all files in a given directory

Started by
2 comments, last by Julio 22 years, 9 months ago
ok, little question. given a directory (c:\something) how do I find out how many files are in the directory and what the file names are? thanks, Joe HHSDrum@yahoo.com
My HomepageSome shoot to kill, others shoot to mame. I say clear the chamber and let the lord decide. - Reno 911
Advertisement
Check MSDN for the functions FindFirstFile() and FindNextFile().

War Worlds - A 3D Real-Time Strategy game in development.
ok, I''ll check that out.
thanks,
Joe

HHSDrum@yahoo.com
My HomepageSome shoot to kill, others shoot to mame. I say clear the chamber and let the lord decide. - Reno 911
  int CFilhantering::GetNumberOfFilesInMap(char *path){   int nr=0;   WIN32_FIND_DATA fd;       HANDLE findHandle = FindFirstFile(path, &fd );       if ( findHandle != INVALID_HANDLE_VALUE )       {              do              {                     nr++;      } while ( FindNextFile( findHandle, &fd ) );              FindClose( findHandle );       }   return nr;}  




Zeblar Nagrim, Lord of Chaos

This topic is closed to new replies.

Advertisement