wait/sleep command

  • Thread starter Thread starter yepiknowiam
  • Start date Start date
Y

yepiknowiam

Is there a wait/sleep equilivant command for the command prompt? I know
there is wscript.sleep for vbs files.

I'm running a batch file and want to it pause a few seconds between commands.

Haven't found much from microsoft. There is the waitfor command but it
wasn't recognized.

Thanks.
 
Use

ping -n XXX 127.0.0.1

replace XXX with the desired number of seconds +1


yepiknowiam wrote:

> Is there a wait/sleep equilivant command for the command prompt? I know
> there is wscript.sleep for vbs files.
>
> I'm running a batch file and want to it pause a few seconds between commands.
>
> Haven't found much from microsoft. There is the waitfor command but it
> wasn't recognized.
>
> Thanks.
 
Poor man's sleep timer:
ping localhost -n (number of seconds to sleep)
Louis

"yepiknowiam" <yepiknowiam@discussions.microsoft.com> wrote in message
news:37466D6D-894F-4104-B902-9986487E4FE2@microsoft.com...
> Is there a wait/sleep equilivant command for the command prompt? I know
> there is wscript.sleep for vbs files.
>
> I'm running a batch file and want to it pause a few seconds between

commands.
>
> Haven't found much from microsoft. There is the waitfor command but it
> wasn't recognized.
>
> Thanks.
 
Oops, that sould have been
ping -n (number of seconds to sleep) localhost
Louis

"yepiknowiam" <yepiknowiam@discussions.microsoft.com> wrote in message
news:37466D6D-894F-4104-B902-9986487E4FE2@microsoft.com...
> Is there a wait/sleep equilivant command for the command prompt? I know
> there is wscript.sleep for vbs files.
>
> I'm running a batch file and want to it pause a few seconds between

commands.
>
> Haven't found much from microsoft. There is the waitfor command but it
> wasn't recognized.
>
> Thanks.
 
"3c273" <nospam@nospam.com> wrote in message
news:g0kfdt0mli@enews4.newsguy.com...
> Oops, that sould have been
> ping -n (number of seconds to sleep) localhost
> Louis


The order of the parameters is irrelevant.
 
Thanks. That did the trick. I'll have to remember that command.

"Pegasus (MVP)" wrote:

>
> "3c273" <nospam@nospam.com> wrote in message
> news:g0kfdt0mli@enews4.newsguy.com...
> > Oops, that sould have been
> > ping -n (number of seconds to sleep) localhost
> > Louis

>
> The order of the parameters is irrelevant.
>
>
>
 
Somehow I thought I left out localhost on the first one. Still asleep I
guess.

Louis

"Pegasus (MVP)" <I.can@fly.com.oz> wrote in message
news:OuCTqo3tIHA.4476@TK2MSFTNGP06.phx.gbl...
>
> "3c273" <nospam@nospam.com> wrote in message
> news:g0kfdt0mli@enews4.newsguy.com...
> > Oops, that sould have been
> > ping -n (number of seconds to sleep) localhost
> > Louis

>
> The order of the parameters is irrelevant.
>
>
 
yepiknowiam wrote:
> Is there a wait/sleep equilivant command for the command prompt? I know
> there is wscript.sleep for vbs files.
>
> I'm running a batch file and want to it pause a few seconds between commands.
>
> Haven't found much from microsoft. There is the waitfor command but it
> wasn't recognized.
>
> Thanks.


There is a microsoft resource kit that includes a sleep command you can use.
http://www.microsoft.com/downloadS/...69-57FF-4AE7-96EE-B18C4790CFFD&displaylang=en
 
I tried the ping -n (local) host to use as a Sleep/wait command, but it
runs forever instead of the number of seconds i assign it. I must be
doing something wrong?

thanks for the help!


--
Mcribisback
 
ping -n xxx 127.0.0.1

(replace xxx with the seconds plus one so for one minute use 61)

Mcribisback wrote:

> I tried the ping -n (local) host to use as a Sleep/wait command, but it
> runs forever instead of the number of seconds i assign it. I must be
> doing something wrong?
>
> thanks for the help!
>
>
 
I did actually try that initially, it still keeps looping for some
reason.


--
Mcribisback
 
Back
Top