本帖最后由 pcl_test 于 2015-8-18 12:34 编辑
发个大概,实际效果自行修改吧- @echo off
- (for /f "usebackq delims=" %%a in ("D:\ip.txt") do (
- set /p"=%%a-->"
- for /f "tokens=4 delims==(" %%i in ('ping -n 20 %%a^|findstr /i "丢失 平均 lost average"') do set /p"=%%i "
- echo;
- ))<nul
- pause
复制代码
|