Finding
I know this is the wrong fourm to put this in, but im going to ask it here anyways. Im trying to load in a file, any file, as long as shell.dat is the last 9 characters...basically read in a folder and tell me how many *shell.dat files there are and pick and choose one. Streaming the fiel isn''t a problem...just kinda searching. The one way i did it before to check for .txt extension wont work cause i needed the file name to do that. Anybody know how to do this?
Let me get this straight, you want to scan a directory for files which end with shell.dat at the end of the filename. Well to do this you can use FindFirstFile() and provide it the wildcard value of *shell.dat
e.g.
WIN32_FIND_DATA FindFileData;
char file[]="c:/system/*shell.dat"
FindFirstFile(file,&FindFileData);
Then use FindFileData.cFileName to retrieve the full filename.
Hope this helps, Kiel.
---------------------------------------------------------------
visit Silent Beginnings at: www.lancs.ac.uk/ug/gilleade
e.g.
WIN32_FIND_DATA FindFileData;
char file[]="c:/system/*shell.dat"
FindFirstFile(file,&FindFileData);
Then use FindFileData.cFileName to retrieve the full filename.
Hope this helps, Kiel.
---------------------------------------------------------------
visit Silent Beginnings at: www.lancs.ac.uk/ug/gilleade
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement