Batch find/replace text string....

Discuss RoboTask here
Post Reply
wdp01
Posts: 12
Joined: Thu Oct 19, 2006 11:12 am

Batch find/replace text string....

Post by wdp01 »

Hello all-
I have a very large folder of .txt files.
In each .txt file there is a text string that I'd like to find and replace, then save the .txt file (can be the same name)
Is there a good way to have robotask do this?  The files have many different/non-sequential names.
wdp
lonnie16
Posts: 20
Joined: Thu Sep 09, 2004 9:40 am
Location: United States
Contact:

Batch find/replace text string....

Post by lonnie16 »

Ahh, hmm, not to take the task away from RoboTask, but I have had to do this many times and I used the 'replace' utility with the 12Ghosts collection.  But you want automation, so never mind...
wdp01
Posts: 12
Joined: Thu Oct 19, 2006 11:12 am

Batch find/replace text string....

Post by wdp01 »

lonnie16-
I can always attempt to automate another program using more complicated keystrokes with RoboTask?  Can you elaborate on what program you speak of?
(I'm not a programmer so the simpler the better.......   )
wdp
 
lonnie16
Posts: 20
Joined: Thu Sep 09, 2004 9:40 am
Location: United States
Contact:

Batch find/replace text string....

Post by lonnie16 »

okay,
(shareware) http://12ghosts.com/ghosts/replace.htm
To repeatedly replace the same strings in the same files or folders call 12-Replace via command line options. This makes it easy to create either a shortcut or a batch file to easily replace several text strings at once.
Syntax:    12replace PATH search-text replace-text [/replaceall] [/nosound]
Example: 12replace.exe "c:\docs" "this" "that"
Oleg
Site Admin
Posts: 3014
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Batch find/replace text string....

Post by Oleg »

There is such freeware (and opensource) command-line utility like FART. See here http://sourceforge.net/projects/fart-it/

You can easily use it within file loop. Also FART can process file masks.
Last edited by Oleg on Wed Jan 31, 2007 2:42 am, edited 1 time in total.
wdp01
Posts: 12
Joined: Thu Oct 19, 2006 11:12 am

Batch find/replace text string....

Post by wdp01 »

Thanks for all the ideas.  I'll give them a shot!
wdp
Post Reply