Mourning the loss of our friend, WhitPhil.
There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
Search
 
All Other Software
Tag Cloud
access audio blue screen boot bsod connection crash dell desktop driver drivers dvd email error excel firefox hard drive hardware hijackthis internet keyboard laptop malware monitor network networking outlook problem processor ram recovery router safe mode screen slow sound spyware tdlwsp.dll trojan upgrade vba video virus vista vundo windows windows 7 windows vista windows xp wireless
Search
Search for:
Tech Support Guy Forums > Software & Hardware > All Other Software >
delete repeated textlines in notepad

Tip: Click here to scan for System Errors and Optimize PC performance
[ Sponsored Link ]

 
Thread Tools
gcole's Avatar
Computer Specs
Junior Member with 3 posts.
 
Join Date: Nov 2009
Location: at the outskirts of Mexico Cit
Experience: Intermediate
03-Nov-2009, 09:31 PM #1
delete repeated textlines in notepad
Hello everybody,

I´m new here and grateful for the existence of this web page.

I have a 6 Mb textfile, wich only can be edited in notepad (Windows). In the file appear about 1000 identical lines, wich should be deleted, without leaving a blank line. Using "replace all" it works without a glitch, but leaves that blank line. With what should I replace the unwanted textline?

My desktop is a HP, 500 RAM, Vista 32bit, Office 2007.

I would appreciate any help offered.

Guido
Dust Sailor's Avatar
Distinguished Member with 2,711 posts.
 
Join Date: Mar 2004
Location: Thunder Bay Ontario
Experience: Still Learning
04-Nov-2009, 03:18 AM #2
Welcome to TSG If you have a blank space between the " top " part and the " bottom " part and wish to close it , make sure the cursor is at the start of the "bottom" line and hold down the " backspace " key until they are in the required position . Does that help ???
__________________
An eye for an eye makes the whole world blind.
Mahatma Gandhi,
TheOutcaste's Avatar
Computer Specs
Distinguished Member with 5,486 posts.
 
Join Date: Aug 2007
Location: Oregon, USA
Experience: Intermediate
04-Nov-2009, 03:27 AM #3
Welcome to TSG!

Can't do it in Notepad, but Notepad++ can do it easily. A great free Notepad replacement.
Highlight the line including the CR/LF by clicking in the border to the left of the line.
If it's not the entire line, just highlight to the end and bring the mouse back to the start of the next line, but don't highlight the first letter of the next line.

Press CTRL+H for Replace, leave the Replace With box blank, click Replace All.
__________________
Microsoft MVP - Windows Desktop Experience
Of course I know all the answers ; I just don't always match the answers to the right questions
Are you aware of the New Signature Limitations?
stantley's Avatar
Computer Specs
Distinguished Member with 5,239 posts.
 
Join Date: May 2005
Location: Super Bowl & Stanley Cup
Experience: ,The Jimi Hendrix
04-Nov-2009, 07:28 AM #4
I agree with TheOutcaste, Notepad++ would do that easily.

If you do end up with some blank lines, you can go to TextFX > TextFX Edit and click on "Delete Blank Lines".
gcole's Avatar
Computer Specs
Junior Member with 3 posts.
 
Join Date: Nov 2009
Location: at the outskirts of Mexico Cit
Experience: Intermediate
04-Nov-2009, 10:23 AM #5
Thanks to everybody. This is not exactly what I had in mind. I was looking for a code to put in the "replace with" box that would delete the line (the way Excel deletes a line). I will try the TheOutcaste/Stantley solution and report back.
gcole's Avatar
Computer Specs
Junior Member with 3 posts.
 
Join Date: Nov 2009
Location: at the outskirts of Mexico Cit
Experience: Intermediate
04-Nov-2009, 11:22 AM #6
It worked as predicted. Thanks a lot to all.
TheOutcaste's Avatar
Computer Specs
Distinguished Member with 5,486 posts.
 
Join Date: Aug 2007
Location: Oregon, USA
Experience: Intermediate
04-Nov-2009, 03:46 PM #7
You're Welcome!

You'd think after all this time they could have added some basic features to Notepad like codes to use to search for tabs and CR/LF, or at least the ability to paste them into the Find and Replace box. When they say it's a plain-text editor, they really mean plain.

If your issue has been resolved you (and ONLY you) can mark this thread Solved by using the Mark Solved button at the Top Left of this thread (above the first post)



Jerry
__________________
Microsoft MVP - Windows Desktop Experience
Of course I know all the answers ; I just don't always match the answers to the right questions
Are you aware of the New Signature Limitations?
Reply Bookmark and Share

Smart Search

Find your solution!



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who want to help you solve your computer problems. See our Welcome Guide to get started.

Thread Tools


You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -5. The time now is 03:09 AM.
Copyright © 1996 - 2009 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2009, Jelsoft Enterprises Ltd.
Powered by Cermak Technologies, Inc.