Thanks ever so much for coming to my rescue. The content of my input file is read successfully by the script. Thanks.
The subsequent processing of these input file values continues to stump me though and I'd be grateful if you could assist. Basically my batch file should retrieve each server name as described in my original post and uses it to replace an existing server name in a web config file.
For e.g, if the web config file has the following keys:
<arg key="MyApp1Root" value="http://localhost:9005/config"/>
I would like to replace the word localhost with "WebServer 1",
<arg key="MyApp2Root" value="http://localhost:9012/config"/>
I would like to replace the word localhost with "AppsServer 2"
And finally for:
<arg key="WWWRoot" value="http://DBServer:9012/config"/>
I would like to replace DBServer with "DatabaseServer 3"
Any ideas how I can achieve this please?