批處理延時方法

有時批處理希望停頓一下,等待其他處理,或者用戶選擇,超時後繼續默認處理。可以用以下方法:


net start "Windows Update"

@Echo off
Echo See above message if OK.
Echo -------------------------------
echo Delay 5 seconds and exit .....
for /L %%i in (5,-1,1) do echo %%i seconds left to Exit && ping 127.0.0.0 -n 2 > nul
Echo Exit.


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章