Community
    • Login

    Remove Duplicate Lines

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    8 Posts 4 Posters 908 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • hasan123H
      hasan123
      last edited by

      Hi,
      Is this possible to remove duplicate lines in a text file/list with Notepad++ ?

      To change this:

      aaaaaaaaaaaa
      bbbbbbbbbbbb
      aaaaaaaaaaaa
      aaaaaaaaaaaa
      cccccccccccc
      dddddddddddd
      eeeeeeeeeeee
      ffffffffffff
      cccccccccccc
      gggggggggggg
      hhhhhhhhhhhh
      gggggggggggg
      gggggggggggg
      cccccccccccc
      

      To

      aaaaaaaaaaaa
      bbbbbbbbbbbb
      cccccccccccc
      dddddddddddd
      eeeeeeeeeeee
      ffffffffffff
      gggggggggggg
      hhhhhhhhhhhh
      
      Alan KilbornA 1 Reply Last reply Reply Quote 0
      • Alan KilbornA
        Alan Kilborn @hasan123
        last edited by

        @hasan123

        Maybe. Key question: Can your lines be sorted without losing meaning?

        hasan123H 1 Reply Last reply Reply Quote 3
        • hasan123H
          hasan123 @Alan Kilborn
          last edited by

          @Alan-Kilborn

          Sorting is not important for my case.

          Alan KilbornA 1 Reply Last reply Reply Quote 1
          • Alan KilbornA
            Alan Kilborn @hasan123
            last edited by

            @hasan123

            Then your best option is to sort the lines using one of the Sort commands, then use the Remove Consecutive Duplicate Lines command. All are on the Edit > Line Operations menu.

            hasan123H 1 Reply Last reply Reply Quote 3
            • hasan123H
              hasan123 @Alan Kilborn
              last edited by

              @Alan-Kilborn

              Yes, Thanks for the info.

              1 Reply Last reply Reply Quote 1
              • rinku singhR
                rinku singh
                last edited by

                Use Remove Duplicate Lines plugin

                https://youtu.be/OP_VqD7lCGw

                1 Reply Last reply Reply Quote 0
                • Prahlad-Makwana4145P
                  Prahlad-Makwana4145
                  last edited by

                  Hello, @hasan123

                  Based on your problem please follow steps to remove duplicate lines with notepad++.

                  Note :- Notepad++ is a feature rich text editor but does not have an integrated feature to remove duplicate lines, however, the option can be added in via the external plugin system Notepad++ uses. Although some are already included the TextFX plugin is not installed by default and needs to be added manually.

                  Step 1:- Go to the Plugins menu.
                  Step 2:- In plugins menu select Plugin Manager > Show Plugin Manager.
                  Step 3:- Find the TextFX Characters plugin from the list.
                  Step 4:- Check the box, click Install and restart the program.
                  Step 5:- After installation, select all the text (Ctrl+A), go to TextFX > TextFX Tools and select the option +Sort outputs only UNIQUE (at column) lines.
                  Step 6:- Go back to the same TextFX Tools menu and either click on Sort lines case sensitive (at column) or Sort lines case insensitive (at column). This will remove the duplicate lines.

                  I hope above information will be useful for you.
                  Thank you.

                  Alan KilbornA 1 Reply Last reply Reply Quote 0
                  • Alan KilbornA
                    Alan Kilborn @Prahlad-Makwana4145
                    last edited by

                    @Prahlad-Makwana4145

                    I would not advise people to use the TextFX plugin as it is old and support is questionable.

                    1 Reply Last reply Reply Quote 0
                    • First post
                      Last post
                    The Community of users of the Notepad++ text editor.
                    Powered by NodeBB | Contributors