Notices
Computer & Technology Related Post here for help and discussion of computing and related technology. Internet, TVs, phones, consoles, computers, tablets and any other gadgets.

Search & Replace In Large Text Files

Thread Tools
 
Search this Thread
 
Old Mar 10, 2010 | 09:04 AM
  #1  
DJ Dunk's Avatar
DJ Dunk
Thread Starter
Moderator
20 Year Member
iTrader: (5)
 
Joined: Nov 2001
Posts: 17,864
Likes: 0
From: Not all those who wander are lost
Default Search & Replace In Large Text Files

I need to do some 'search & replace' over some plain text files. Some of the files are 1Gb+ so my usual editor (Textpad) gives up and crashes after 250k rows or so.

Is there a simple vbs or dos command I can run over a file(s), without the need to open it/them? Or perhaps some free dedicated software to do the job?
Reply
Old Mar 10, 2010 | 10:59 AM
  #2  
Iain Young's Avatar
Iain Young
Scooby Regular
 
Joined: Sep 1999
Posts: 6,956
Likes: 0
From: Swindon, Wiltshire Xbox Gamertag: Gutgouger
Default

You could try Notepad++. That should be able to handle it.

Failing that, use cygwin and grep/sed etc
Reply
Old Mar 10, 2010 | 12:43 PM
  #3  
DJ Dunk's Avatar
DJ Dunk
Thread Starter
Moderator
20 Year Member
iTrader: (5)
 
Joined: Nov 2001
Posts: 17,864
Likes: 0
From: Not all those who wander are lost
Default

Cheers Iain. I managed to do it in the end . . . a couple of ways. One was to increase my virtual memory maximum size to 9999Mb so that Textpad didn't crap-out; the other was a command line utility called FART (Find And Replace Text)

FART worked superbly; bashed though the 1Gb text file in seconds, even though it was making millions of replacements Think I'll keep that one for future use
Reply
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
Mattybr5@MB Developments
Full Cars Breaking For Spares
28
Dec 28, 2015 11:07 PM
Phil3822
General Technical
0
Sep 30, 2015 06:29 PM
alcazar
Computer & Technology Related
2
Sep 29, 2015 07:18 PM
Nick_Cat
Computer & Technology Related
2
Sep 26, 2015 08:00 AM
Littleted
Computer & Technology Related
0
Sep 25, 2015 08:44 AM




All times are GMT +1. The time now is 09:12 PM.