The following is credited to nbrane September 19, 2012 at 19:46:42 on this post(why do something thats already done :)) https://computing.net/answers/pr… this might serve IF there are no other empty lines you want to keep: @echo off for /f “tokens=*” %%a in (textfil) do >>noblanks echo %%a move /y noblanks textfil ::===== end be sure to keep a backup copy of the original file, since that last command writes over it.
on this post(why do something thats already done :))
https://computing.net/answers/pr…
this might serve IF there are no other empty lines you want to keep:
@echo off
for /f “tokens=*” %%a in (textfil) do >>noblanks echo %%a
move /y noblanks textfil
::===== end
be sure to keep a backup copy of the original file, since that last command writes over it.
:: mike