computing
  • 0

Solved Delete Blank Line From a Txt File Using Batch

  • 0

Hi Can any one help me here, i have a text file
30-05-2011 08:45:20
41
50
498
243
991
78
236
38
38
420
859
233
616
43
591
991
591
11
129
10
341
541
85
143

272985
17537
69
78
236
243
85
302

like this , i need to remove all empty lines from here . i tried this option already.
for /f “tokens=* delims= ” %%a in (C:\log\DEVolap.log) do echo %%a>>DEVOLAP.txt
still it didnt work, it may be because of trailing spaces, can anyone help me plzzzzzzzzzzzzzzzzzzzzzzz.

Share

1 Answer

  1. What about:

    findstr /v /r /c:"^$" /c:"^\ *$" "C:\log\DEVolap.log" >> "DEVOLAP.txt"
    

    • 0