How do I Xcopy to multiple destinations using a list in a .txt file?
Posted on 2008-10-10
Machine - XP
Server - 2003
Trying to run an Xcopy to copy a folder from a single server to multiple servers. Would like to have the server list on a text document rather than imbedded in the xcopy.
This is the general idea of what I am trying to do, but it just tries to copy to "\\c:\svrlst.txt\vol1\installs"
for %%a in (c:\svrlst.txt) do xcopy c:\folder \\%%a\vol1\folder /e /i
server1, server2, server3
I know the following line works, but I would like the list in a txt file that is easier to manage:
for %%a in (server1, server2, server3) do xcopy c:\folder \\%%a\vol1\folder /e /i