I'd like to use any copy command (PSexec, Robocopy, copy, xcopy) to copy a SINGLE file to the same location on MULTIPLE machines using XP.

xCopy TEST.txt \\MACHINE1\C:\MyDir
xCopy TEST.txt \\MACHINE2\C:\MyDir
xCopy TEST.txt \\MACHINE3\C:\MyDir
Cxopy TEST.txt \\MACHINE4\C:\MyDir

Anyone have a sample batch file or utility to do this?

0 Comments   [ - ] Hide Comments


Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
Answer this question or Comment on this question for clarity


Here are a few suggestions. One is to use excel to create the batch file contents for you. If you know what the command needs to look like, as in your example, only the machine name needs to change. I would personally use robocopy but anything should work for a small single file copy. Also, you will need to use \\MachineName\C$ instead of C:\ to access the C: remotely.

Here is how to create this in Excel:
  1. Open a new Excel doc
  2. In Column A paste the list of machines
  3. In Colum B select the first cell
  4. Insert this function at the top:="xCopy TEST.txt \\" & A1 & "\C$\MyDir"
  5. Hit enter to save the function
  6. With the first cell in column B selected, hover over the drag\copy handle at the bottom right corner (cursor should become a plus sign) all the way down to where you list in column A stops.
  7. For each line the function for A1 should change to A2, A3 etc and insert the appropriate machine name
  8. Paste column B contents into a batch file

Also you can get more fancy and do all of this through a Wise Script or VBScript where you just feed it a list of systems and it runs in a loop hitting each machine. But this is the simple way.

Also, if you are looking for remotely deploying software I would suggest the Remote Software Installation Utility. The whole suite of Install Solutions tools are exceptional for systems management. I am the author so a little biased but check it out.
Answered 03/12/2008 by: yarborg
Blue Belt

Please log in to comment