(imported topic written by arwhite91)
A large portion of our environment is loaded with .ini files that contain configuration settings. I’ve been writing analyses to pull back the value of certain keys within these files. In most cases I can get way with only pulling a specific key, but I’m running into trouble when I’m trying to pull back anything other than a specific key from a specific section.
Here’s a sample of data from an .ini file.
[1]
NODISC=Y
NOEMPLOYEEDISC=Y
NOFBDISC=N
NOTAX1=Y
NOTAX2=N
The desired end result is to pull back the name of any key that =Y, but I haven’t been able to find relevance to even pull the name of the key. It seems like I should be able to ask for {keys of section “1” of file “c:\file.ini” but ‘keys of is not defined.’ Is it possible to get this data, or am I barking up the wrong tree? I could say all text prior to the first = of lines that contains =Y, but I eventually need to be able to tie it back to the section it originated from as well.