opening all files in a given directory
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
Check MSDN for the functions FindFirstFile() and FindNextFile().
War Worlds - A 3D Real-Time Strategy game in development.
War Worlds - A 3D Real-Time Strategy game in development.
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
Popular Topics
Advertisement