在BAT里得到域名IP 并写入记事本里

@echo off
Set /p domain=请输入域名:
(For /f "tokens=2 delims=[]" %%i in ('ping /n 1 %domain%') do echo %%i)>1.txt
start 1.txt
pause