Notepad++ remove duplicates, remove blank lines and sort data in one operation

This post is part 1 of 5 in the series Efficient work using Notepad++

Notepad++ remove duplicates, remove blank lines and sort data in one operationNotepad++ with the TextFX plugin makes it quick and easy to remove duplicates, remove blank lines and sort data in one operation. This is a typical case where Excel does the job, but as I always have Notepad++ open it is fast and easy to get the results I want in just a few seconds.

Remove duplicates, remove blank lines and sort data in one operation

Paste text into Notepad++
1. Paste the text into Notepad++ (CTRL+V). As you can see, there were 473 lines and half of them were blank.

Mark all the text and click Sort outputs only UNIQUE
2. Mark all the text (CTRL+A). Click TextFX → Click TextFX Tools → Check +Sort outputs only UNIQUE (at column) lines (if not already checked).

Click Sort lines case insensitive
3. Click TextFX → Click TextFX Tools → Click Sort lines case insensitive (at column)

Remove duplicates and sort data alphabeticallt
4. Duplicates and blank lines have been removed and the data has been sorted alphabetically. (The first line that may appear empty contains a space, which is regarded as a character and is included in the list of unique data.)

This is a handy feature somewhat hidden away in the menu, and it has saved me a lot of time already.

Who is Cathrine Wilhelmsen?

Cathrine is a Microsoft Data Platform MVP, BimlHero, Microsoft Certified Solutions Expert, author, speaker, blogger and chronic volunteer who loves teaching and sharing knowledge. She works as a consultant, architect and developer, focusing on Data Warehouse and Business Intelligence projects. She loves sci-fi, chocolate, coffee, craft beers, ciders, cat gifs and smilies :)

Comments

Hi! This is Cathrine. Thank you so much for visiting my blog. I'd love to hear your thoughts, but please keep in mind that I'm not technical support for any products mentioned in this post :) Off-topic questions, comments and discussions may be moderated. Thanks!

Click to Show / Hide Comments