批處理IF怎樣判斷多個條件的時間值最后由 bobgjs 于 -5-16 14:06我想讓IF判斷多個時間值,按不同的時間執行相應的操作,我測試無效,請求幫助。初學者,請勿見笑。我改了,仍然不行,請求賜教啊。。。。。。。。我這樣寫是對的嗎?nclick="copycode($('code0'));">復制代碼
- @echo off
- :IF
- echo.
- echo.
- echo%time:~0,5%
- if %time:~0,5% EQU 11:30 goto :tas
- if %time:~0,5% EQU 13:32 goto :tas
- if %time:~0,5% EQU 15:34 goto :tas
- if %time:~0,5% EQU 16:36 goto :tas
- if %time:~0,5% EQU 20:38 goto :shut
- ping 127.1 -n 10 >nul
- cls
- goto :IF
- :tas
- taskkill /f /im QQ.exe
- ping 127.1 -n 10 >nul
- start F:QQBinQQ.exe
- goto :IF
- :shut
- echo shutdown -r -f -t 0