CFileFind finder;

BOOL bWorking = finder.FindFile("*.*");

while (bWorking)

{

bWorking = finder.FindNextFile();

cout << (LPCTSTR) finder.GetFileName() << endl;

}