Menu

How to Delete Blank Lines

2008-03-02
2012-11-13
  • alphachapmtl

    alphachapmtl - 2008-03-02

    I have a list of data in a .txt file.
    When loaded in Notepad++, all lines are separated by an extra blank line, probably cause of extra CR/LF (CarriageReturn/LineFeed) in the file.
    How to get rid of all those blank lines?
    Is there a delete blank lines function?
    (there are too many files of too many lines to delete them one by one)

    Thanks

     
    • WeyrleaderZor

      WeyrleaderZor - 2008-03-02

      that was a major reason why I quit using Notepad too - just didn't do what I needed it to do; and then there were other things it'd do that I didn't want it to do... *grr* I hate it when someone thinks they know better than me what I want to do, or how I want to go about doing it...

       
      • Nobody/Anonymous

        There are computer users who let Microsoft dictate the rules, and there are computer users who think for themselves...

         
    • WeyrleaderZor

      WeyrleaderZor - 2008-03-02

      Doing a brief search of these forums I found the following answer on this thread:

      http://sourceforge.net/forum/message.php?msg_id=4691695

      "What do you mean by automatically?

      You can do it manually.
      Menu: TextFX
      Submenu: TextFX Edit
      Option: Delete Blank Lines

      But you have to make a selection first (probably CTRL+A)."

      (Anonymous/Nobody)

      And per the following thread you should check out the URL below (under the thread URL) for some info on that kind of action.

      http://sourceforge.net/forum/message.php?msg_id=4294814

      "For empty lines, see http://notepad-plus.sourceforge.net/uk/newlineFindReplace-HOWTO.php for all your options."

      (pshute)

      Hope those help you. :)

       
    • alphachapmtl

      alphachapmtl - 2008-03-02

      Thanks, that's automatic enough for me.

      Actually I was having a problem with Notepad: a properly formatted text file, would loose it's formatting when updated and saved.
      Changing the "Word Wrap" did not solve the problem.

      So I downloaded Notepad++, but in there my file had extra lines, caused by extra CR/LF, as shown by "View: Show End Of Line".
      Notepad has no option for dealing with stuff like that.
      But as you showed me, Notepad++ TextFX Edit Menu has it! I'm surprised by all I see in those menus!
      I liked Notepad simplicity, but it's useless to me if it destroy my formatting.
      I guess from now on I'll switch from Notepad to Notepad++.