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 10 March 2010, 09:04 AM
  #1  
DJ Dunk
Moderator
Support Scoobynet!
Thread Starter
iTrader: (5)
 
DJ Dunk's Avatar
 
Join Date: Nov 2001
Location: Not all those who wander are lost
Posts: 17,863
Received 0 Likes on 0 Posts
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?
Old 10 March 2010, 10:59 AM
  #2  
Iain Young
Scooby Regular
 
Iain Young's Avatar
 
Join Date: Sep 1999
Location: Swindon, Wiltshire Xbox Gamertag: Gutgouger
Posts: 6,956
Likes: 0
Received 0 Likes on 0 Posts
Default

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

Failing that, use cygwin and grep/sed etc
Old 10 March 2010, 12:43 PM
  #3  
DJ Dunk
Moderator
Support Scoobynet!
Thread Starter
iTrader: (5)
 
DJ Dunk's Avatar
 
Join Date: Nov 2001
Location: Not all those who wander are lost
Posts: 17,863
Received 0 Likes on 0 Posts
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
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
Mattybr5@MB Developments
Full Cars Breaking For Spares
28
28 December 2015 11:07 PM
Phil3822
General Technical
0
30 September 2015 06:29 PM
alcazar
Computer & Technology Related
2
29 September 2015 07:18 PM
Nick_Cat
Computer & Technology Related
2
26 September 2015 08:00 AM
Littleted
Computer & Technology Related
0
25 September 2015 08:44 AM



Quick Reply: Search & Replace In Large Text Files



All times are GMT +1. The time now is 08:49 AM.