Jump to content

Remove Blank Lines.


AzKay
 Share

Recommended Posts

Any ideas? I know how to remove white spaces, etc.

But how would you remove just the empty lines?

eg:

aaaaa

aaaaa

aaaaa

The lines "between" that are empty. So it would end up being:

aaaaa

aaaaa

aaaaa

# MY LOVE FOR YOU... IS LIKE A TRUCK- #
Link to comment
Share on other sites

maybe...

#include <file.au3>

Dim $aRecords, $file = "C:\test.txt"

If Not _FileReadToArray($file,$aRecords) Then
   MsgBox(4096,"Error", " Error reading log to Array     error:" & @error)
   Exit
EndIf

For $x = 1 to $aRecords[0]
    If $aRecords[$x] = "" Then ContinueLoop
    Msgbox(0,'Record:' & $x, $aRecords[$x])
Next

8)

Edited by Valuater

NEWHeader1.png

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...