Pause a script

G

Guest

Folks:


I am looking for a DOS command that would force my batch file (containing a
FOR ... DO loop) to wait until a
downloading procedure (about 5 minutes long) is all done.before starting on
the next loop.

My batch file looks something like:
---------------------------------------------------
FOR /F %%I IN (C:\MyTextFile.txt) DO (
SET VAR=%%I
ECHO %VAR%
"C:\Program Files\Download.exe")
---------------------------------------------------

* What additional code do I need to include to ensure that while a file
is being downloaded; the script waits before starting the next loop ?


Thanks,
JoJo.
 
M

Marty List

Try using START /WAIT, like this:

start "This is the Title" /wait "C:\Program Files\Download.exe"


The "Title" portion is anything you want it to be, for hidden or GUI apps
it's not important:

start "" /wait "C:\Program Files\Download.exe"
 

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