AG> I'm just beginning to program in Delphi 2.0, and i have a problem.
AG> I want to read all .INI files in one subdirectory and read some
AG> sections in these files. How can I do this? I know how to read a
AG> section in the ini-file, but I don't know how i can get all files in
AG> a specific directory..
AG> It has to be done in a procedure..
AG> If anyone can help me????
Andy,
I am not sure how you reading your .INI files, but the TIniFile object
works great and is easy to use for working with .INI files, the examples in
on-line help are pretty easy to follow.
As far as how to get all the files in a directory, you will need to write a
loop using the FindFirst and FindNext functions to get the files in a
directory, you could process each .INI file as you come to it and ignore all
other files. That sounds a bit inefficient to me though, doesn't your program
know what .INI files it is looking for?
Why don't you write the program to read each .INI File from the location you
expect it to be? That will be much faster than looking through all the files
in a directory as I mentioned above.
Hope this helps.
Steve
--- FreeMail 1.07b
(1:203/21)
---------------
* Origin: The Visual Programmer's Workshop - N.H., Ca (916)338-3230 *
|