大佬教程收集整理的这篇文章主要介绍了用户在Windows批处理文件中决定超时,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
我的来源到目前为止:
SET /P ANSWER=Do you want it (Y/N)? IF /i {%ANSWER%}=={y} GOTO :yes IF /i {%ANSWER%}=={yes} GOTO :yes GOTO :no :yes @echo Yeah,it will be done. GOTO :conTinue :no @echo Nope,it will not happen. GOTO :conTinue :conTinue @echo And on we go
您可以尝试以下某些操作:
timeout 10 ping 0.0.0.0 -n 1 -w 10000 > nul
如果那些失败,你总是可以选择一个简单的循环(即如果选择有效)
:loop choice /t 10 /c ynr /cs /d r /m "Do you want it (Y/N)?" if errorlevel 3 goto :loop if errorlevel 2 goto :no if errorlevel 1 goto :yes :yes @echo Yeah,it will not happen. GOTO :conTinue :conTinue @echo And on we go
以上是大佬教程为你收集整理的用户在Windows批处理文件中决定超时全部内容,希望文章能够帮你解决用户在Windows批处理文件中决定超时所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。