>>332 typeの代替えバッチ

@echo off & set /a b=1
for /f "delims=:" %%i in ('type "%~1" ^| findstr /n /r /c:"^$"') do call :x %%i
set /a a%b%=0,b=1,c=1
for /f delims^=^ eol^= %%i in ('type "%~1"') do call :y & echo.%%i
goto :eof
:x
set /a a%b%=%1,b-=-1 & exit /b
:y
set /a d=a%b%
set /a c-=-1 & if %c%==%d% echo.& set /a b-=-1 & goto y

動作文字コードは>>332の4種類とcp932とBOM付UTF-16LE
内部コマンドのtypeの文字化けの原因は不明
得体の知れないバッチが嫌ならnkfでどうぞ