
- 帖子
- 6
- 积分
- 28
- 技术
- 0
- 捐助
- 0
- 注册时间
- 2010-9-14
|
新人报到IP与MAC收集更新
这代码对比更新不行请指教
@echo off
if exist c:\mac.ini goto up
for /l %%a in (1,1,254) do ping 172.16.0.%%a -w 1 -n 1
PING 172.16.1.1 -w 3000 -n 1
for /f "skip=3 tokens=1,2 delims= " %%i in ('arp -a') do echo %%j %%i >>c:\mac.ini
goto end
:up
for /l %%a in (1,1,254) do ping 172.16.0.%%a -w 1 -n 1
PING 172.16.1.1 -w 3000 -n 1
for /f "skip=3 tokens=1,2 delims= " %%d in ('arp -a') do find "%%d " c:\mac.ini||echo %%e %%d >>c:\mac.ini
:end |
|