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.

Multiple Find & Replace Text Help!

Thread Tools
 
Search this Thread
 
Old Feb 5, 2007 | 04:03 PM
  #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 Multiple Find & Replace Text Help!

I have a large number of text files that all need text within them altered.

eg.
abc123.txt
bca123.txt
cba123.txt

I also have a 3 column list that specifies the filename, search text and replace text.

eg.
FILENAME, SEARCH, REPLACE
abc123.txt, value1, value2
bca123.txt, value1, value2
cba123.txt, value1, value2

Is there some software that I can use to make these changes using the text file ?
Reply
Old Feb 5, 2007 | 04:17 PM
  #2  
ChefDude's Avatar
ChefDude
Scooby Regular
 
Joined: Aug 2005
Posts: 4,291
Likes: 0
Default

TextPad will do the multi search and replace, but not from a list.
Reply
Old Feb 5, 2007 | 04:34 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

Thanks I use TextPad to do most of my manipulation, but as you say, it can't handle this.

The 3 column list would actually be more like:

FILENAME, SEARCH, REPLACE
abc123.txt, value1, value2
bca123.txt, value1, value3
cba123.txt, value1, value4
Reply
Old Feb 5, 2007 | 04:48 PM
  #4  
David_Wallis's Avatar
David_Wallis
Scooby Regular
 
Joined: Nov 2001
Posts: 15,239
Likes: 1
From: Leeds - It was 562.4bhp@28psi on Optimax, How much closer to 600 with race fuel and a bigger turbo?
Default

I can do it in a script.. If there is a set format?

Notepad++ is pretty good too.
David
Reply
Old Feb 5, 2007 | 04:58 PM
  #5  
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

The format would be exactly as above. The search and replace list would always be in the same 3 column format, but I'm flexible as to how its delimited.

Any help would be massively appreciated

Something like:

file1.txt, "find text string", "replace with this"
file2.txt, "find text string", "replace with something else"
Reply
Old Feb 5, 2007 | 05:12 PM
  #6  
ChefDude's Avatar
ChefDude
Scooby Regular
 
Joined: Aug 2005
Posts: 4,291
Likes: 0
Default

this help?
Batch Replacer!: The Greatest tool for find and replace operations!
Reply
Old Feb 5, 2007 | 05:28 PM
  #7  
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

Thanks, but that won't work. It needs to be a specific replacement within a specific file.
Reply
Old Feb 5, 2007 | 06:42 PM
  #8  
HankScorpio's Avatar
HankScorpio
Scooby Regular
 
Joined: Feb 2004
Posts: 5,848
Likes: 0
Default

If you've got an input file, you could batch it to get the three tokens and then feed them to a program called LINSTRP.EXE available from Lexacorp Ltd - Information Technology Consultants for Software Development in Papua New Guinea.

I use it on 50+ Meg log files and works a treat.
Reply
Old Feb 5, 2007 | 07:40 PM
  #9  
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

Originally Posted by HankScorpio
If you've got an input file, you could batch it to get the three tokens and then feed them to a program called LINSTRP.EXE available from Lexacorp Ltd - Information Technology Consultants for Software Development in Papua New Guinea.

I use it on 50+ Meg log files and works a treat.
Brilliant, many thanks, that should do the job nicely
Reply
Old Feb 6, 2007 | 10:54 AM
  #10  
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

Worked perfectly, thanks again, saved me a lot of work !
Reply
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
Scott@ScoobySpares
Full Cars Breaking For Spares
61
Jan 11, 2021 03:08 PM
GeeDee
Subaru
18
Mar 4, 2020 07:10 PM
aaron_ions
General Technical
1
Sep 17, 2015 10:42 AM
Danny0608
Subaru Parts
0
Sep 12, 2015 02:59 PM




All times are GMT +1. The time now is 04:22 AM.