The following is credited to nbrane September 19, 2012 at 19:46:42 on this post(why do something thats already done :)) http://www.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.
The information on Computing.Net is the opinions of its users. Such
opinions may not be accurate and they are to be used at your own risk.
Computing.Net cannot verify the validity of the statements made on this
site. Computing.Net and Purch hereby disclaim all responsibility
and liability for the content of Computing.Net and its accuracy.