直显:
for /l %i in (1,1,255) do @ ping 10.0.0.%i -w 1 -n 1|find /i "ttl="
导出:
@for /l %i in (1,1,255) do @ping -n 1 -w 40 123.123.123.%i & if errorlevel 1 (echo 123.123.123.%i>>c:\a.txt) else (echo 123.123.123.%i >>c:\b.txt)