I'm finding it difficult to do something and wondered if I may call upon some assistance.
Infact it's difficult for me to explain so will try my best here. My issue is actually the same problem as in this thread which is explained better. I'm trying to add some extra functionality to the end of it...
Is there anyway to seperate a variable such as %SERVERS% which contain data such as \\SERVER1 \\SERVER2 \\SERVER3 \\SERVER4 \\SERVER5
these would all be in one string, to form 5 command lines like this...
Somehow in a While Statement? although I'm struggling to put a condition into it.
In more detail this is what I'm trying to do....
I'm generating a list of servers on the network from running a NET VIEW command and outputing the contents to a file called servers.txt
Then I'm tidying it up a bit with some magic to remove empty lines and other characters I don't need.
Once this is done, I take that file and read it back in line by line to a variable called %MACHINE%
Then I set a new variable called %SERVERS% based on %MACHINE%%CRLF% and have a listbox showing me my server list.
You can select one or many servers from the list and the ones you select are sent to RESULT but they're in the format as shown above like \\SERVER1 \\SERVER2 etc
I want to build a command line up with these server names now but I can't figure out how to do it.
Can anyone help me?
I've attached what I have so far if that helps.