
CODE: [Copy to clipboard][ Last edited by zw19750516 on 2008-7-5 at 03:21 PM ]@echo off&setlocal enabledelayedexpansion
for /f "tokens=2 delims=:" %%i in ('ipconfig /all^|findstr /c:"Physical Address"')do (
set /a n+=1,m=0
set str=%%i&set str=!str:~1!&call :lp
)
echo 搞定!
pause>nul&goto :eof
:lp
for /f "tokens=2 delims=:" %%i in ('ipconfig /all^|findstr /c:"IP Address"') do (
set /a m+=1
if !m! equ %n% (
set var=%%i&set var=!var:~1!
arp -s !var! !str!
)
)
| Quote: | |
|
| 欢迎光临 中国DOS联盟论坛 (http://cndos.fam.cx/forum/) | Powered by Discuz! 2.5 |