Advertisement

opening all files in a given directory

Started by June 23, 2001 11:32 AM
2 comments, last by Julio 23 years, 7 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
Check MSDN for the functions FindFirstFile() and FindNextFile().


War Worlds - A 3D Real-Time Strategy game in development.
Advertisement
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