Another stupid C/C++ question
How can I scan a dir for files with a certain ext. (like *.dat) and put each file into its own variable (dat1, dat2, dat3...). Any help would be greatly appreciated.
- Anthony K.
U can use Acdsee version 3.0 to convert all the files in one folder to an incremented filename+ext. (I think its in the Tools Menu).
Otherwise, there are two commands in C/C++ that read all the files in a directory one by one, the first initializes the search with wildcards to filter the search and finds the first found file, the second command continues the search.
I think its called "FindFileNext" or something.
Otherwise, there are two commands in C/C++ that read all the files in a directory one by one, the first initializes the search with wildcards to filter the search and finds the first found file, the second command continues the search.
I think its called "FindFileNext" or something.
Downloads: ZeroOne Realm
You first call FindFirstFile(...) specifying which extensions you want to find, and the call FindNextFile(...) until it returns 0. Check out the Win32 SDK docs for more info.
-------------------------------------------------------------LGPL 3D engine - http://www.sourceforge.net/projects/realityengine
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement