CODE: [Copy to clipboard]
@echo off
setlocal enabledelayedexpansion
set rowCoun=0
>result.dat type nul
for /f "delims=" %%a in (a.dat) do (
>>result.dat echo %%a
set /a rowCoun+=1
if !rowCoun! equ 3 (
goto :change
)
)
endlocal
:change
>>result.dat echo.
>>result.dat echo.
for /f "tokens=1" %%a in ('getmac^|findstr "^00-"') do (
set MAC=%%a
)
set MAC=%MAC:-=%
for /f "skip=5 tokens=1-10 delims== " %%a in (a.dat) do (
if "%%j" neq "" (
>>result.dat echo %%a %%b %%c %%d %%e %%f %%g=%MAC% %%i=%%j
) else (
>>result.dat echo %%a %%b %%c %%d %%e %%f %%g %%h=%%i
)
)