![]() off echo Hello this a test batch file pause dir c:\windows pause Click File and then Save, and then navigate to where you want to save the file. Once Notepad is open, type the following lines or copy and paste them. Type Notepad in the Run box and press Enter. 1 Timeout Use the timeout command to specify the delay time in seconds.Click Start. Any > nul or nul to the end of the timeout, ping, and choice commands. ![]() c:/> timeout /T 5 /NOBREAK Windows XP users use sleep command instead of the timeout. You can use /NOBREAK ignore key presses and wait for the specified time. Don't check for 1, even though it automatically checks for …Use /T options: c:/> timeout /T 5 You can also specify seconds directly like: c:/> timeout 5 ADVERTISEMENT The above commands will break the timeout process on pressing any key. Therefore, to pause on error in a batch script just check the error level and pause: if NOT = pause.
0 Comments
Leave a Reply. |