1.

Solve : Batch to remove blank lines from a TXT file.?

Answer»

It would take me the rest of the night. I need to be awake in the morning. I get report files that have too many blank lines (white space). The lines are not always NULL length, that might have tabs or spaces, but no visible chars.
No need to preserve then original file.

So, can you help me please? I need to get to bed.

CODE: [Select]TYPE "file.txt" |findrepl "^\s*$" /V >"newfile.txt"
This uses a helper BATCH file called findrepl.bat from - http://www.dostips.com/forum/viewtopic.php?f=3&t=4697



Discussion

No Comment Found