呵呵,给你缩了缩水,不用临时文件。
未测试。。
:- @echo off
- set /p dz=
- for /f "tokens=1-4 delims=." %%a in ("%dz%") do (
- if not "%%d"=="" (call :nnn "%dz%"&exit)
- )
- for /l %%i in (1,1,254) do call :nnn "%dz%.%%i"
- exit
- :nnn
- for /f "tokens=1* delims= " %%e in ('arp -a %~1^|findstr "dynamic static"') do (
- for /f "tokens=1-3 delims= " %%j in ("%%e %%f") do arp -s %%j %%k
- )
- goto :eof
复制代码
|