infoman1@vk, вот так ещё точнее:
Код:

@echo off
(
for /f %%i in ('
find /c /v ""^<"123.txt"
') do (
set m=%%i
)
)|| set m=0
(
for /f "delims=:" %%i in ('
findstr /n $ "123.txt"
') do (
set n=%%i
)
)|| set n=0
if %n% lss %m% (
echo.>>"123.txt"
)
for %%i in (
"tekst tekst tekst tekst "
"tekst tekst tekst tekst tekst tekst tekst "
"tekst tekst tekst "
"tekst tekst tekst tekst "
) do (
echo %%~i>>"123.txt"
)
exit /b
.