Introvert or Extrovert Quiz
Q&A for How to Delay a Batch File
Coming soon
Search
-
QuestionHow do I not get a message when I use timeout?Community AnswerAdd the >nul qualifier, like this: timeout /t 120 >nul. This causes a 2 minute delay with no output to the screen.
-
QuestionWhat if the sleep command doesn't work?Community AnswerIf the sleep command doesn't work, use timeout instead.
-
QuestionWhat if I want to wait less than one second? I can't just use a dot or a comma.Community AnswerYou can use the ping command. This command, if used with a non-existent IP address, will try to talk to a non-existent computer and give up after a specified number of milliseconds. Just multiply the number of seconds by 1000, and you're good to go.
-
QuestionWhat can I do if the PING command skips?Community AnswerMake sure that you are using an invalid IP address. Also, remove '>nul' from the end and see what it outputs -- this might tell you why it skips.
-
QuestionHow do I check if a folder is created?David LangrCommunity AnswerIn this case, you can use "Parenthesis": @echo off IF EXIST "C:\Folder" ( echo Folder exists! ) ELSE ( Echo Folder does not exist! ) pause > nul
-
QuestionHow do I get rid of a warning message for a time out?Community AnswerTo get rid of the warning message for a timeout, out >nul at the end of the line, and it will hide the warning.
-
QuestionHow do I delete the message for ping?Community AnswerYou should have: ping [a fake ip] Add >nul Now it should look like this: ping [a fake ip] >nul
-
QuestionCan time out be used under an IF condition?Community AnswerYes, example: IF "String" == "String" (timeout 10 echo "String is equal to other string").
-
QuestionWhat do i do if the TIMEOUT command skips?Community AnswerYou might have pressed a key before or during the timeout part. You should use timeout /t /nobreak.
-
QuestionHow to remove the "Waiting for seconds, press ctrl+c to quit" prompt?TutorialGod4Community AnswerAdding >nul to the end of the line should work. "timeout /nul" is the command you want from this answer.
-
QuestionCan you use a 0.5 second time out?ArroganceTop AnswererNot using the timeout command. You would need to supply your own program with a better granularity, or invoke PowerShell with the Start-Sleep command. "powershell -command "Start-Sleep -m 500".
-
QuestionIs there a way to change the measurement of time for timeout? For example, milliseconds, minutes.ArroganceTop AnswererThe timeout command only supports seconds as an input. You can use up to 100000 seconds, which is approximately 1,666 minutes or 27 hours, so it isn't really a problem that it doesn't accept minutes or hours.
Ask a Question
200 characters left
Include your email address to get a message when this question is answered.
Submit