
CODE: [Copy to clipboard]%gw:~1%用于把最前面带进去的空格去掉@echo off
for /f "tokens=2 delims=:" %%i in (`ipconfig ^| find "Default Gateway"`) do set gw=%%i
for /f "tokens=2 delims= " %%i in (`arp -a ^| findstr "\<%gw:~1%\>"`) do echo %%i
pause

| Quote: | |
|

| 欢迎光临 中国DOS联盟论坛 (http://cndos.fam.cx/forum/) | Powered by Discuz! 2.5 |