Try using below batch (save it as "modfile.cmd").
Note: the space between "%%A" and "%%B" is a tab character. It's not
actually space characters. This is to preserve the original format. DO check
it after copy+pasting the code.
@echo off
setlocal enabledelayedexpansion
if not "%~2" == "" goto chksource
echo usage: modfile {source} {target}
goto :eof
:chksource
if exist %1 goto chkdest
echo Source file not found.
goto :eof
:chkdest
if not exist %2 goto start
echo Destination file is already exist and will be overwritten.
pause
:start
if exist %2 del %2
>%2 rem
set key=SD
for /f "tokens=1,2-4,5,*" %%A in (%1) do (
if not "%%A" == "" (
>>%2 echo %%A %%B %%C %%D %%E_!key! %%F
) else (
>>%2 echo.
)
if !key! == SD (set key=HD) else (set key=SD)
)