@replace - global use in a text file

Sep 17, 2010
5
0
#1
I understand how @replace works on a defined text string.

Is it possible to do the replace on an entire ascii text file? I actually need to do many, many files, but if I can do one, I can create a list of files and set up a btm file to do all of them one at a time.
 
#2
---- Original Message ----
From: mdwyer
To: [email protected]
Sent: Monday, 2010. November 1. 15:50
Subject: [Support-t-2391] @replace - global use in a text file

| I understand how @replace works on a defined text string.
|
| Is it possible to do the replace on an entire ascii text file? I
| actually need to do many, many files, but if I can do one, I can
| create a list of files and set up a btm file to do all of them one at
| a time.

Sorry, no. The best you can do is to loop through each line of the file.
--
Steve
 
Sep 17, 2010
5
0
#3
---- Original Message ----

Sorry, no. The best you can do is to loop through each line of the file.
--
Steve
Thought so, but noob. I will test with Notetab Pro, which is my text editor. I know I can open a few dozen files with that and do a global search and replace in a minute or so, and then a global save all, but this is circa 10K small html files, so this should be interesting.
 

Charles Dye

Super Moderator
Staff member
May 20, 2008
3,602
46
Albuquerque, NM
prospero.unm.edu
#4
Thought so, but noob. I will test with Notetab Pro, which is my text editor. I know I can open a few dozen files with that and do a global search and replace in a minute or so, and then a global save all, but this is circa 10K small html files, so this should be interesting.
Sounds like a good job for sed. Once you figure out how to do it for one text file, you can use FOR to repeat over the lot of them.