I have 100 windows 7 boxes which connected together with switch, and don't have internet access. I need to deploy some files (~1G) to every machine. Is there a fast way to do this, especially with script? And maybe have a verification process. I have admin access.

This is how I do this for now:

  • On machine 1, share that folder to everyone
  • Go to machine 2, open explorer, go to \\<machine 1 IP>\c$\path\to folder\
  • Windows prompt to ask login credential, enter id: < machine 1 IP>\< admin account>, eg:\administrator, and enter pwd
  • Copy and paste the file (this won't take to long since it's gig Ethernet)
  • Jump on machine 3 and repeat

This way I have to enter id/pwd 100 times and go to each machine. I am looking for a way to reduce the repetitive typing and I can work on machine 1 to finish the deployment process. Can the community advise? Thanks.

  • 1
    Are your 100 Windows 7 boxes on a domain? Mar 2 '11 at 9:00
  • Nope, there's no domain controller. I guess those are just using default home network settings.
    – Stan
    Mar 2 '11 at 12:35
  • 2
    Ouch. For manageability in future, I'd strongly suggest you put them on a domain if possible. Mar 2 '11 at 13:24

Its rough because its a batch script, I'm sure some someone will come along with some fancy perl and do it in two lines.

First. You'll need a list of devices or their IP's in a text file (machines.txt in the example). Format with one IP/Machine name per line.

Second. Create CopyFiles.bat

Dump the following in and amend for your specific purposes.

for /f "delims= tokens=1" %%a in (machines.txt) DO call :process %%a

set node=%1
net use X: /D /Y

I haven't tested it, but it should get you close.

  • 1
    +1 just pointing out the (hopefully) obvious but this would be run from machine #1, which would map/push the file to each machine in the iteration (oh and don't put machine #1 in the machines.txt file).
    – gravyface
    Mar 2 '11 at 13:49
  • This will deploy in sequence. Would it be better to do in parallel to utilize maximum bandwidth? and how?
    – Stan
    Mar 2 '11 at 14:14
  • 1
    Errr - make two copies of the copyfiles.bat and do half the machines with one and half the machines with the other? And +1'd to gravyface for pointing out the missing bits from my original post.
    – Patrick
    Mar 2 '11 at 14:27
  • You're not going to be doing anything in parallel using a BAT script. The question is, will this be fast enough to meet your needs? It does meet your stated requirements in your question.
    – mfinni
    Mar 2 '11 at 14:28
  • 1
    Fastcopy might not be any faster than using built-in copy.exe for a network copy. Also, since this is Windows 7, you can use the multi-threaded version of robocopy, which will speed things up, I imagine.
    – mfinni
    Mar 2 '11 at 18:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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