This is not a standard C/C++ question. FindFirstFile and FindNextFile are part of the Windows API.
However info you need is here:
http://msdn.microsoft.com/library/de...dfirstfile.asp
Example - finds files of the specified filter (e.g. "c:/*.txt") and draws a message box displaying each one's name:
Code:
BOOL findsomefiles(LPCSTR filter)
{
WIN32_FIND_DATA wfd;
HANDLE hFind;
BOOL result;
hFind=FindFirstFile(filter,&wfd);
if(hFind==(HANDLE)INVALID_HANDLE_VALUE)
return 0;
do
{
MessageBox(0,wfd.cFileName,"Found file",MB_ICONINFORMATION);
result=FindNextFile(hFind,&wfd);
} while(result && result!=ERROR_NO_MORE_FILES);
FindClose(hFind);
return 1;
}