I and trying to write a batch file that looks at a list of servers and then pings each in turn to determine if they are contactable.
The list of servers is held in a variable and are delimited by and exclamation mark (!). An example would be
There may be more or less than three servers in the string.
How do I loop through each element of the server_string variable string to get the individual server names into a new variable called server so I can ping it?
So on loop 1 the output variable is set to server1, on the 2nd loop it is server2 etc. continuing until there are no more server names in the server_string variable.
I have been trying using the FOR command but cannot quite get the syntax.
Thank you very much for your kind help.