View Full Version : Pausing


Fyodor Koryazhkin
10-30-2005, 02:23 PM
Hi,
Yet another question.
Is there any possibility to pause an execution of batch file for cirtain
amount of time (let say 10 seconds)?

Thank you
Fyodor.

Mark V
10-30-2005, 04:45 PM
In microsoft.public.win2000.cmdprompt.admin Fyodor Koryazhkin
wrote:

> Hi,
> Yet another question.
> Is there any possibility to pause an execution of batch file for
> cirtain amount of time (let say 10 seconds)?
>
> Thank you
> Fyodor.

ping.exe -n 11 127.0.0.1 >nul

is one method.
Certain "sleep" or "wait" utilities can also be used.
In some cases START "" /WAIT <command> may be appropriate. (NT5.x)

William Allen
10-30-2005, 05:48 PM
"Fyodor Koryazhkin" wrote in message
> Hi,
> Yet another question.
> Is there any possibility to pause an execution of batch file for cirtain
> amount of time (let say 10 seconds)?

Typically, use PING with the -n switch set to number of seconds
to delay plus one, thus:

ping -n 11 127.0.0.1 >NUL

However, if you want to WAIT for the completion of a
separate process, you may prefer to use START /WAIT

For full details of how to insert delays and event waits in Batch
files, including an explanation of the PING method above,
see http://www.allenware.com/icsw/icswref.htm#Delays

--
William Allen
Free interactive Batch Course http://www.allenware.com/icsw/icswidx.htm
Batch Reference with examples http://www.allenware.com/icsw/icswref.htm
From email address not checked. Contact us at http://www.allenware.com/

Timo Salmi
10-30-2005, 10:00 PM
Fyodor Koryazhkin wrote:
> Is there any possibility to pause an execution of batch file for
> cirtain amount of time (let say 10 seconds)?

19} How can one build a delay / sleep / wait procedure for a script?
143047 Oct 30 2005 ftp://garbo.uwasa.fi/pc/link/tscmd.zip
tscmd.zip Useful NT/2000/XP script tricks and tips, T.Salmi

All the best, Timo

--
Prof. Timo Salmi ftp & http://garbo.uwasa.fi/ archives 193.166.120.5
Department of Accounting and Business Finance ; University of Vaasa
mailto:ts@uwasa.fi <http://www.uwasa.fi/~ts/> ; FIN-65101, Finland
Timo's FAQ materials at http://www.uwasa.fi/~ts/http/tsfaq.html