Page 1 of 1 1
Topic Options
#204 - 1999-07-14 03:10 PM Run command
Anonymous
Unregistered


Hello all,

Is their any way I can use run to start multiple files at once, then have the script wait for completion of those programs before continuing on?

Basically i am spawning several instances of a file copy program and I want to do them at the same time to save time. However, later in the script I also have those directories replicating to another server that is kicked off by command line. As of right now, I can run all my copying at the same time, but the replication kicks off because I issued run commands for the copying. This hoses things up because the copying has not completed yet. I really hope I don't have to use shell to copy those files, that will take a long time..


Any help would be greatly appreciated.

Thank you,

Brent

Top
#205 - 1999-07-15 02:57 AM Re: Run command
Anonymous
Unregistered


You need to run multiple scripts/batch files at once, with the RUN command.
In those scripts/batch files, at the end you need to generate a token file in a directory.

then in the main script make a do until loop that looks something like this:

DO
sleep 5
UNTIL EXIST("COPYTOKEN1.TXT") AND EXIST("COPYTOKEN2.TXT") AND EXIST("COPYTOKEN3.TXT")

this should do the trick !!!

------------------
Lon Geefshuysen,
www.xs4all.nl/~longeef/NT/KiXtart
lon_geefshuysen@essentium.com



Top
#206 - 1999-07-15 08:21 AM Re: Run command
Anonymous
Unregistered


Right, but how do you generate a token file after it executes the run command?

That is the part that seems to be failing me.

Brent

Top
#207 - 1999-07-15 09:36 AM Re: Run command
Anonymous
Unregistered


where does cookie1 command place the file, and what is it's name?

This theory should work, but i can't seem to find the files it creates.

Top
#208 - 1999-07-15 10:13 AM Re: Run command
Anonymous
Unregistered


the copy command must be in seperate .bat files which yoiu can run simultaniously.
in those batch files at the end (so after the actual copy) you generate a copytoken like this:

echo token1 > copytoken1.txt
(in the main script you need to delete these copytoken files before starting the copy command batch files !!)

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 1171 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.048 seconds in which 0.022 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org