How do I make a batch file wait / sleep for some seconds?

Cegorach

I use a batch file to start up a few of the programs I need running in the background. Up until now, I had used the pause command to execute it after some of the other start-ups finished. I would prefer to use the wait or sleep commands but they do not appear to be included in Windows 7.

Anybody know how to put those commands back in, or a different method that achieves the same results?

John T

There are many sleep utilities you can download and drop into your System32 folder, one is provided with the Windows Server 2003 Resource Kit called sleep.exe.

You can also use the ping trick:

:sleep
ping 127.0.0.1 -n 2 -w 1000 > NUL
ping 127.0.0.1 -n %1 -w 1000 > NUL

then from somewhere in your batch file, you can call it like so:

CALL :sleep 1

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Java

How to sleep for five seconds in a batch file/cmd

From Dev

How do I make a batch file that started a process to wait for the process to terminate?

From Dev

How to make a batch file wait for fractions of a second?

From Dev

How do I make a batch file the default application for a file type

From Dev

How do I make my laptop sleep when it reaches some low battery threshold?

From Dev

How do I make a command in a batch file not prompt to front?

From Dev

ffmpeg is not removing some seconds from the beginning of this video. Why and how can I make it do so?

From Dev

How to make thread sleep for seconds in iOS?

From Dev

batch file /wait not working, where did I do wrong?

From Dev

How do I make a batch web browser?

From Dev

How do I make an "if and if" statement in Windows Batch?

From Dev

How do I remove the some parts of a file name for many files in Windows 7 using batch script?

From Dev

How do I wait for a file in the shell script?

From Dev

how to make the silverlight page to wait for few seconds

From Dev

How do I make a program sleep twice in one if statement?

From Dev

I want to write a batch file that internally calls python script and I want python script to return some value to the batch file. how can I do that?

From Dev

How do I make one particular line of a batch file a different color then the others?

From Dev

How do I make the woocommerce message disappear after 5 seconds?

From Dev

How do I make a textfield editable for 10 seconds on the click of a button?

From Dev

How do I write this in a batch file

From Dev

How do I locate a batch file

From Dev

How do i to store input in a batch file?

From Dev

Batch how do i output this into a text file?

From Dev

How can I make my JavaScript wait 0.5 seconds before running the next statement?

From Java

How do I make python wait for a pressed key?

From Dev

How do I make the code Wait for a few milliseconds in C#?

From Dev

How do I make Protractor wait for a triggered promise to resolve?

From Dev

How do I make jQuery wait for a recursive function to finish?

From Dev

How do I make an activity wait until Facebook login is complete?

Related Related

  1. 1

    How to sleep for five seconds in a batch file/cmd

  2. 2

    How do I make a batch file that started a process to wait for the process to terminate?

  3. 3

    How to make a batch file wait for fractions of a second?

  4. 4

    How do I make a batch file the default application for a file type

  5. 5

    How do I make my laptop sleep when it reaches some low battery threshold?

  6. 6

    How do I make a command in a batch file not prompt to front?

  7. 7

    ffmpeg is not removing some seconds from the beginning of this video. Why and how can I make it do so?

  8. 8

    How to make thread sleep for seconds in iOS?

  9. 9

    batch file /wait not working, where did I do wrong?

  10. 10

    How do I make a batch web browser?

  11. 11

    How do I make an "if and if" statement in Windows Batch?

  12. 12

    How do I remove the some parts of a file name for many files in Windows 7 using batch script?

  13. 13

    How do I wait for a file in the shell script?

  14. 14

    how to make the silverlight page to wait for few seconds

  15. 15

    How do I make a program sleep twice in one if statement?

  16. 16

    I want to write a batch file that internally calls python script and I want python script to return some value to the batch file. how can I do that?

  17. 17

    How do I make one particular line of a batch file a different color then the others?

  18. 18

    How do I make the woocommerce message disappear after 5 seconds?

  19. 19

    How do I make a textfield editable for 10 seconds on the click of a button?

  20. 20

    How do I write this in a batch file

  21. 21

    How do I locate a batch file

  22. 22

    How do i to store input in a batch file?

  23. 23

    Batch how do i output this into a text file?

  24. 24

    How can I make my JavaScript wait 0.5 seconds before running the next statement?

  25. 25

    How do I make python wait for a pressed key?

  26. 26

    How do I make the code Wait for a few milliseconds in C#?

  27. 27

    How do I make Protractor wait for a triggered promise to resolve?

  28. 28

    How do I make jQuery wait for a recursive function to finish?

  29. 29

    How do I make an activity wait until Facebook login is complete?

HotTag

Archive