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 acer asus bios bsod computer crash drive driver drivers error ethernet excel freeze games gaming graphics hard drive hardware hdmi internet laptop malware memory monitor motherboard netgear network printer problem ram random registry router slow software sound trojan usb video virus vista wifi windows windows 7 windows 7 32 bit windows 7 64 bit windows xp wireless xbox
Search
Search for:
Tech Support Guy Forums > Software & Hardware > All Other Software >
delete repeated textlines in notepad

Reply  
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, 10: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
Senior Member with 2,735 posts.
 
Join Date: Mar 2004
Location: Thunder Bay Ontario
Experience: More 'n More Learnin'
04-Nov-2009, 04: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 9,048 posts.
 
Join Date: Aug 2007
Location: Oregon, USA
Experience: Intermediate
04-Nov-2009, 04: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 Expert - Consumer
Of course I know all the answers ; I just don't always match the answers to the right questions

stantley's Avatar
Computer Specs
Distinguished Member with 6,738 posts.
 
Join Date: May 2005
Location: Pittsburgh PA USA
Experience: ,The Jimi Hendrix
04-Nov-2009, 08: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, 11: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, 12:22 PM #6
It worked as predicted. Thanks a lot to all.
TheOutcaste's Avatar
Computer Specs
Distinguished Member with 9,048 posts.
 
Join Date: Aug 2007
Location: Oregon, USA
Experience: Intermediate
04-Nov-2009, 04: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 Expert - Consumer
Of course I know all the answers ; I just don't always match the answers to the right questions

Reply

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.

Search Tech Support Guy

Find the solution to your
computer problem!




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



Facebook Facebook Twitter Twitter TechGuy.tv TechGuy.tv Mobile TSG Mobile
You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 02:59 PM.
Copyright © 1996 - 2011 TechGuy, Inc. All rights reserved.

Powered by Cermak Technologies, Inc.