How to get all file name in a folder
C / C++ / MFC
2
Posts
2
Posters
0
Views
1
Watching
-
CString theFileNamePath; CString extension("*.txt"); CString filePath("C://"); CString completeFilePath; HANDLE handleToFind; WIN32_FIND_DATA FindInfo; WIN32_FIND_DATA *FindInfoPoint = &FindInfo; completeFilePath.SetString(filePath+ extension); handleToFind = FindFirstFile(completeFilePath,FindInfoPoint); while(handleToFind != NULL) { theFileNamePath = completeFilePath+ FindInfo.cFileName; //....SOMETHING.... if (FindNextFile(handleToFind,FindInfoPoint) == 0) break; }//while FindClose(handleToFind); hope that'll do:)