I feel stupid for asking this but this is something I've not done before. I've used FOR a lot to parse a command (i.e. dir *., date /t, etc.) to then process that info in some way - reset permissions on a set of folders, set and environment variable to the date and time, etc.
This time I want to take a single file (SvrFile.txt) that contains a list of servers, such as this example:
Shouldn't the FOR command be able to read each line and echo the server names to the screen? At best I can only get the command to list the text file itself:
for /f "eol=~" %G IN ("c:\kix32\svrfile.txt") do echo %G
I can easily script this task - and I have - and I know it's really "old school" but now the question is sticking in my head and I haven't found a pertinent example to follow.
Any help would be appreciated.