
批處理判斷ping通沒有這樣寫可以不
我想實(shí)現(xiàn)的是ping一個(gè)ip 如果是通的就跳轉(zhuǎn)到:dx里面 反之則:lt 可以這樣寫不?如果不能該怎么實(shí)現(xiàn)呢?請(qǐng)大神幫下忙nclick="copycode($('code0'));">復(fù)制代碼
- @echo off
- echo 222.178.110.161 >>iptest.txt
- FOR /f %%i IN (iptest.txt) DO (ping -n 1 %%i|findstr TTL>nul&&goto dx||goto lt)

