@echo off&setlocal enabledelayedexpansionecho 0>fortemp.txt>nulset n=0for /f "delims=" %%i in (file.txt) do (if "!n!"=="0" (echo [b]%%i[/b] >>fortemp.txt&&set /a n+=1 ) else (echo %%i >>fortemp.txt &&set n=0echo.>>fortemp.txt))pause