Page 1 of 1

Batch find/replace text string....

Posted: Tue Jan 30, 2007 1:20 pm
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

Batch find/replace text string....

Posted: Tue Jan 30, 2007 4:44 pm
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...

Batch find/replace text string....

Posted: Tue Jan 30, 2007 4:47 pm
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
 

Batch find/replace text string....

Posted: Tue Jan 30, 2007 5:49 pm
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"

Batch find/replace text string....

Posted: Tue Jan 30, 2007 10:40 pm
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.

Batch find/replace text string....

Posted: Wed Jan 31, 2007 4:22 am
by wdp01
Thanks for all the ideas.  I'll give them a shot!
wdp