How can one copy a file, from his windows computer, to a cluster of multiple windows machine, with one command? I thought about using psexec, but that also tries to execute the file...

link|improve this question

80% accept rate
feedback

3 Answers

up vote 0 down vote accepted

If it's always to the same targets you might want to consider a batch file using a for loop, which simplifies maintenance somewhat. The source and destination can be either coded in or passed as parameters.

link|improve this answer
feedback

Check out this SuperUser thread: http://superuser.com/questions/32630/parallel-file-copy-from-single-source-to-multiple-targets

In short, try N2NCopy or use the batch script that Revolter mentions in the SU thread.

link|improve this answer
feedback

I still sometimes find a simple batch file handy. This is an example I use to copy a virtual hard drive to 2 different computers for backup.

@ECHO OFF
ECHO %date% %time% > E:\buresult.txt
ECHO Backing up E:\WinXP Dev Hard Disk.vhd to E:\WinXP Dev Backup\WinXP Dev Hard Disk.vhd ...
ECHO Backing up E:\WinXP Dev Hard Disk.vhd to E:\WinXP Dev Backup\WinXP Dev Hard Disk.vhd ... >> E:\buresult.txt
copy "E:\WinXP Dev Hard Disk.vhd" "E:\WinXP Dev Backup\WinXP Dev Hard Disk.vhd" /y >> E:\buresult.txt
ECHO %date% %time% >> E:\buresult.txt
ECHO Backing up E:\WinXP Dev Hard Disk.vhd to R:\WinXP Dev Hard Disk.vhd ...
ECHO Backing up E:\WinXP Dev Hard Disk.vhd to R:\WinXP Dev Hard Disk.vhd ... >> E:\buresult.txt
copy "E:\WinXP Dev Hard Disk.vhd" "\\Ibsserver\Backups\bholeman" /y >> E:\buresult.txt
ECHO %date% %time% >> E:\buresult.txt
ECHO Done
ECHO Done >> E:\buresult.txt
TYPE NUL | CHOICE.COM /N /CY /TY,5 >NUL
START E:\buresult.txt
EXIT
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.