Thanks for your previous help.
https://msdn.microsoft.com/en-us/lib...=vs.85%29.aspx
Would this code fragment successfully output to file c:\mylist\list1.txt a list of the names of all the files & subdirectories in directory c:\qwerty\ ?
Would a wildcard code *.* find a file whose name does not end in a dot and a filetype code\?
https://msdn.microsoft.com/en-us/lib...=vs.85%29.aspx
Would this code fragment successfully output to file c:\mylist\list1.txt a list of the names of all the files & subdirectories in directory c:\qwerty\ ?
Code:
{
struct _WIN32_FIND_DATA foundfileinfo;
HANDLE dsh,dh; FILE filelist=fopen("c:\\mylists\\list1.txt","w");
dsh=FindFirstFile("c:\\qwerty\\*.*",foundfileinfo);
if(dsh==INVALID_HANDLE_VALUE) goto NOTFOUND;
WORKONFILE: sprint(filelist,"%s\n",foundfileinfo.cFileName);
dh=FindNextFile(dsh,lpFindFileData);
if(dn) goto WORKONFILE;
NOTFOUND: fclose(filelist);
FindClose(dsh);
}