Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Distributing files across the network 1

Status
Not open for further replies.

Meldric

MIS
Sep 5, 2001
139
US
I need to distribute the contents of a directory on our application server to all the PCs in our network. I have tried writing a script to copy from location A to location B for each computer, but found that using CopyFolder and CopyFile it goes consecutively not in "parallel"(for lack of a better word). So for a 4 hour transfer over the WAN per computer it would take forever.

Is there a way in VBScript to copy the contents of a folder from one computer to multiple computers at the same time?

Do I need to be looking into a third party application?

I could use ghost, but we have not rolled out the new version yet and doing it with the old version would be cumbersome.

Thanks in advance.
Roger
 
How many computers?

You could do something like have two nested loops, where the outer loop fires off a subgroup of copies.

The inner loop would use WshShell.Run to start a copy of a second script that actually does the copying to one computer. The second script would accept a parameter to tell it which computer it was "working for."

You might pace the process (thus the outer and inner loops) by having the last WshShell.Run in the inner loop specify "wait for completion" (a simple True in the third parameter of WshShell.Run instead of False).

So if you had 60 computers to send the stuff to, the outer loop might loop 6 times.

The inner loop would start 9 copies of the worker script with "don't wait for completion" and 1 copy with "wait."

This means you'd have (about) no more than 10 copies of the worker running at a time. I say "about" because naturally good ol' number 10 with "wait" might get done before the others some of the time.

-- Just an idea.
 
Thanks for the response Dilettante. I have about 180 computers to do this to over a weekend.

I will attempt the theory you have and will let you know if it works.

Roger
 
You could use a simple batch file to do this job using a resource tool called scopy (it copies the security settings)

Here is an example:

Set MASTER= "Source server"
Set APPSPATH=\d$\applicationsSet LOG=d:\logs\copy.txt
Set SCiPY=c:\scopy.exe

Set APPLIC=dcseries.new

PAUSE Are you sure?

for %%B in (server1,
server2,
server3,
server4,
server5,
server6) do %SCiPY% "\\%MASTER%%APPSPATH%%APPLIC%" "\\%%B%APPSPATH%%APPLIC%" /o /s >> d:\logs\appscopy.txt

Let me know if it's usefull.

Ade
 
Well, I wrote the script with two nested loops and we finally had a chance to test it this last weekend and everything works like a charm.

Thanks everyone for your help.

Roger
 
Glad to hear it!

Nothing like having a theory work out in actual practice.

If you get back this way, let us know how many worker scripts you let run in parallel and how much time it all took, etc.
 
Dilettante

We were transferring 100meg of data to, what worked out to be, approx 200 pcs. We let the scripts run 12 in parallel at one time for the first 100 computers. We then realized that was going to take to long(about 1 hr 30 min per computer across the frame relay network). So we put a gig card in the server and upped it to 20 per iteration.

Next weekend is the real test though. 300meg of updates to push to about 150 computers. Not a optimal way of doing business, but with 2 people supporting 800 total users in six states, you do what you have to.

Roger
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top