Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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...

share|improve this question

3 Answers 3

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.

share|improve this answer

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.

share|improve this answer

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
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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