cameramonkey
MIS
I am trying to automate some simple commands to replicate some new folders to all of my identically configured servers.
is there a way to pull a list of variables from a txt file so that I can acheive the following:
mkdir \\[server1]\%path%$\%path%\%dir%
mkdir \\[server2]\%path%$\%path%\%dir%
mkdir \\[server3]\%path%$\%path%\%dir%
mkdir \\[server4]\%path%$\%path%\%dir%
...
the txt file would have the following
server1
server2
server3
server4
server5
...
I am trying to start with a list of the servers that I want to include, so that as servers are added and removed, I only have to change the txt file and the bat file above will follow along with no changes. This file is already used as a reference by other apps, so those changes are already done for other reasons.
I am already setting the variables (%dir%, etc)on the fly with user input each time the script is run, and I just need to pull the servernames from the txt file to complete the puzzle.
TIA
is there a way to pull a list of variables from a txt file so that I can acheive the following:
mkdir \\[server1]\%path%$\%path%\%dir%
mkdir \\[server2]\%path%$\%path%\%dir%
mkdir \\[server3]\%path%$\%path%\%dir%
mkdir \\[server4]\%path%$\%path%\%dir%
...
the txt file would have the following
server1
server2
server3
server4
server5
...
I am trying to start with a list of the servers that I want to include, so that as servers are added and removed, I only have to change the txt file and the bat file above will follow along with no changes. This file is already used as a reference by other apps, so those changes are already done for other reasons.
I am already setting the variables (%dir%, etc)on the fly with user input each time the script is run, and I just need to pull the servernames from the txt file to complete the puzzle.
TIA