Page 1 of 1

How do i read stuff from a config (.cfg) file?

PostPosted: September 16th, 2003, 4:09 pm
by zero
I would really need to read some stuff out of another application's config (.cfg) file in my application. How do I do that?

PostPosted: September 16th, 2003, 5:15 pm
by Kambiz
Do you know the format and fields of the config file?

PostPosted: September 16th, 2003, 7:41 pm
by Johnny_Bit
I'll give you advice: "File extension isn't so important, that data inside file" besides basing on file extension you won't ever know if file is this file, that you're thinking

PostPosted: September 23rd, 2003, 12:26 pm
by zero
The line I would need looks like this:
"value" "25"
I would also need to save this line into the cfg file after modifying, because other applications also use this file.

PostPosted: September 23rd, 2003, 4:47 pm
by Kambiz
You can use a TStringList to read the file, pharse and change the content, and save it back.