@echo off
setlocal enabledelayedexpansion
for /f "tokens=1* delims=:" %%i in ('findstr /n .* a.txt') do (
set /a "n=(%%i-1)/10 + 1"
if !n!==12 set n=11
echo %%j>>!n!.txt)
@echo off
set f=1&set n=1
FOR /F "delims=" %%a IN (a.txt) DO (set a=%%a
call :AAA
)
exit
:AAA
if %f% GTR 10 echo %a%>>%f%.txt & goto :EOF
if %n% LEQ 10 echo %a%>>%f%.txt
set /a n+=1
if %n% GTR 10 set n=1&set /a f+=1
goto :EOF