Hi ravenspawn.
Here is some code to list the contents of a directory
under Windows.I have tested this for winnt 4.0.
Hope this answers your other query also.
Best Regards,
abp
#include <windows.h>
#include <stdio.h>
#include <iostream.h>
#ifdef _UNICODE
#undef _UNICODE
#endif
#define BUFFLEN 100
int main()
{
LPCTSTR dirName= "<your directory path here>";
char srchStr[BUFFLEN];
char fileName[BUFFLEN];
WIN32_FIND_DATA* lpFileData;
HANDLE hFile;
sprintf(srchStr,"%s/*.*", dirName);
lpFileData = new WIN32_FIND_DATA;
/* Open the directory */
hFile = ::FindFirstFile((LPCTSTR)srchStr, lpFileData);
if (hFile == INVALID_HANDLE_VALUE)
return 0;
// lpFileData = NULL;
while

:FindNextFile(hFile, lpFileData))
{
/* Get full path of file to print */
sprintf(fileName, "%s%s", dirName, lpFileData->cFileName);
cout << fileName << endl;
}
return 0;
}