11-10-2015 08:24 AM - edited 11-10-2015 08:26 AM
Hi
I have used that method but.. If I delete the section LPt3 and its keys, I need to upadate the Section_Name without the Lpt3
My config file is something like this
[Device]
Section_Name = " Lpt1 Lpt2 Lpt3 Lpt4 Lpt5 Lpt6"
[Lpt1]
Name = "Lpt1"
Value = "4"
[Lpt2]
Name= "Lpt2"
Value = "6"
so on till Lpt6 ....So when I delete the Lpt3 device I would like to update my Section_Name...
How could that be done or rewrite the file?
11-10-2015 08:43 AM
mkReddy wrote:I have used that method but.. If I delete the section LPt3 and its keys, I need to upadate the Section_Name without the Lpt3
As GerdW already stated, you will want to read that key, do the string manipulation to remove the Lpt3 from the string, and then write back to the key. Again, the configuration file API takes care of all of this except for the actual string manipulation.