Lookup and append ini file
Posted: 16 Sep 2013 01:24
Hi All.
Thanking you in advance:
I am looking for a way to resolve a hostname and then append an ini file with the ip address. The problem that I am experiencing is that in the ini file, there are multiple Ip addresses and I only want to update the IPAddress line under one of the fifty headings. Here is an example of the ini file which contains 50 exact listings like below with the only point of reference being the [Headind] on top of each section.
[Estacion 1]
Version=1
Channel=SOCKET
Cpu=0
Station=1
AutoStation=0
Retry=3
DontClose=0
PguMode=0
PhoneNumber=
CountryCode=0
AreaCode=0
Location=
UseDialing=0
DeviceName=
IPAddress=189.14.80.10
FdlStation=0
Cheers
FiZz
Thanking you in advance:
I am looking for a way to resolve a hostname and then append an ini file with the ip address. The problem that I am experiencing is that in the ini file, there are multiple Ip addresses and I only want to update the IPAddress line under one of the fifty headings. Here is an example of the ini file which contains 50 exact listings like below with the only point of reference being the [Headind] on top of each section.
[Estacion 1]
Version=1
Channel=SOCKET
Cpu=0
Station=1
AutoStation=0
Retry=3
DontClose=0
PguMode=0
PhoneNumber=
CountryCode=0
AreaCode=0
Location=
UseDialing=0
DeviceName=
IPAddress=189.14.80.10
FdlStation=0
Cheers
FiZz