@echo off
rem 从nslookup命令返回的结果中提取特定内容
set #=Any question&set @=WX&set $=Q&set/az=0x53b7e0b4
title %#% +%$%%$%/%@% %z%
cd /d "%~dp0"
set "txtfile1=List.txt"
if not exist "%txtfile1%" (echo"%txtfile1%" 未找到&pause&exit)
for /f %%a in ('type "%txtfile1%"') do (
for /f "tokens=2" %%b in ('nslookup "%%~a" 2^>^&1 ^|findstr /ib "名称: Name:"') do (
echoip:%%a,名称:%%b
)
)
echo%#% +%$%%$%/%@% %z%
pause
exit
@echo offcd /d "%~dp0"
for /f "tokens=1,2" %%a in ('type "IP.txt"') do (
echo开始ping%%a,稍后……
ping %%b >>"结果.txt" 2>&1
echo————————————————————————————>>"结果.txt"
)
pause
互助互利,及时采纳回答
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)