Advertisement

Another stupid C/C++ question

Started by March 06, 2000 04:30 PM
1 comment, last by Anthonyk 24 years, 7 months ago
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.

  Downloads:  ZeroOne Realm

Advertisement
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