Hey All,
I can normally search my way out of scripting roadblocks thanks to these forums and the rest of the net, but am running into getting this accomplished.
Ultimately I need to change some values in a specific section of an INI.
I have tried to use the Classpack from JSware - but can't get things to work correctly.
Here is a sample of the ini file:
[Servers]
Item1=blah
Item2=blah2
Item3=blah3
[LowSpeedConnection]
Item1=0
Item2=0
Item3=0
Item4=1
Item5=0
Item6=0
Item7=0
Item8=0
[ConnSettings]
Item1=10.213.0.67
Using classes and functions I have found, I have no issue getting the INI file into a dictionary object and echoing the [LowSpeedConnection] sections values.
What I can't seem to accomplish is editing those values while in the object and saving back the entire INI file with the new changes.
All I want to do is change the values for each Item key in the [LowSpeedConnection] section to a 1 (the gotcha for me is that there can be a diff. number of Item keys for each file I want to change, not just 1-8 like in my sample)
I may be over complicating things and can't see the simple solution
Any help or direction would be greatly appreciated.
Clay
I can normally search my way out of scripting roadblocks thanks to these forums and the rest of the net, but am running into getting this accomplished.
Ultimately I need to change some values in a specific section of an INI.
I have tried to use the Classpack from JSware - but can't get things to work correctly.
Here is a sample of the ini file:
[Servers]
Item1=blah
Item2=blah2
Item3=blah3
[LowSpeedConnection]
Item1=0
Item2=0
Item3=0
Item4=1
Item5=0
Item6=0
Item7=0
Item8=0
[ConnSettings]
Item1=10.213.0.67
Using classes and functions I have found, I have no issue getting the INI file into a dictionary object and echoing the [LowSpeedConnection] sections values.
What I can't seem to accomplish is editing those values while in the object and saving back the entire INI file with the new changes.
All I want to do is change the values for each Item key in the [LowSpeedConnection] section to a 1 (the gotcha for me is that there can be a diff. number of Item keys for each file I want to change, not just 1-8 like in my sample)
I may be over complicating things and can't see the simple solution
Any help or direction would be greatly appreciated.
Clay