PDA

View Full Version : Single file copy to same directory on multiple machines - XP


Pothole
Mar 10, 2008, 09:11 PM
Hi.

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.

e.g.
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?

Cheers

WallyHelps
Mar 11, 2008, 11:26 AM
You might try this from the command line (or bat file):
For %i in (MACHINE1 MACHINE2 MACHINE3 MACHINE4) do xcopy TEST.txt \\%i\C:\MyDir

Hope this helps!
WallyH