Discussion in 'Software' started by RITESH, Jan 30, 2017.
How to make 1sec delay count in cmd?
Found this page for you. - http://www.wikihow.com/Delay-a-Batch-File
Use the PAUSE command to make the program wait for the user. This will cause the computer to wait for any key to be pressed. The key will not be printed to the screen. If you want to delay for a specific amount of time, see one of the following methods.
Place the PAUSE command where you want the program to wait. The user will be prompted to continue.
Hide the PAUSE dialog. You can add >nul to the end of any command to send its output to the "Null Device" so it doesn't appear on the screen. Make sure you don't add >null to the end; that will create a new file called null and put the output there.
Use the TIMEOUT command to make the program wait a specified amount of time. The user can skip this waiting period, or you can apply a parameter that keeps the user from skipping.
TIMEOUT may not work with older systems. Try the deprecated SLEEP command if the TIMEOUT command isn't working.
Place the TIMEOUT command where you want the program to wait. Add the flag /t followed by the number of seconds.
Keep the user from skipping the break. Add the flag /nobreak to keep any input from skipping the delay.
The user can still end the program by pressing Ctrl + C (keyboard interrupt).
Use the SLEEP command to make the program wait the specified number of seconds. SLEEP is deprecated; if possible TIMEOUT should be used instead.
Place the SLEEP command where you want to program to wait. Add the number of seconds you want it to wait after the SLEEP command. The SLEEP command cannot be interrupted by the user.
Use the PING command to force the program to wait by sending a message to another computer and waiting for a reply. You must ping a non-valid IP address, otherwise a computer might actually reply, and the delay won't be long enough. You cannot ping a non-valid hostname, such as madeup.example.com otherwise error messages will be shown instead of a delay.
Insert the PING command where you want the delay to occur. The -n 1 parameter adds a second ping to the original command. The wait between the two pings, designated by -w 30000, is the delay. The delay has to be entered as milliseconds. Putting >nul at the end will send the command's output to the "Null Device".
how ping command work?/
Ping has a designated length of time it will wait for a response. The length of time Ping will wait for a non-existent IP address to respond is how long you can make your command-line script wait.
You probably know as much about Ping as I do. I myself have only used ping a time or two, but never as a form of pausing. I have used pause mostly, sleep with counters, and I believe timeout once.
how ping command work in circuit
Separate names with a comma.