Waiting for a process to finish

B

Ben Langhals

Hi,
I have a batch file that calls a batch file that calls yet another batch
file. The last batch file then starts an executable that will install
and then shut itself down.

I want the first batch file to wait until that installer is finished.
Since the installer is called in another batch file

does not work in this case. Any other ideas?
 
G

Guest

I've got a similar problem, without the nested batch files.

I run a 16-bit DOS program (Microsoft's own RTF-DOC converter from Word 5.5)
to convert a .DOC file to .RTF and then the MOVE command to overwrite the old
..RTF file. I don't have the converter use the same name so I can avoid the
"File exists: overwrite?" prompt.

The problem is that sometimes, apparently if the file being converted is
~too~ big, the MOVE command executes before the converter finishes. In fact,
the error message from MOVE comes out before the converter finishes its
banner.

I've tried using START /B /WAIT on the converter. I've tried running other
programs between the two commands. Neither helps. Both together don't help.

Command extensions are enabled.

Aren't batch commands supposed to execute sequentially?
 
G

Guest

Bob I said:
Could use an If loop to wait/check till it finishes.

Could, but it doesn't work. It just results in an infinite loop (well, at
least two minutes). Doing it by hand, it only takes a matter of seconds.
 
B

Bob I

Suppose you could try using the

Ping -n [number seconds + 1] 127.0.0.1

trick as a time delay.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top