@replace - global use in a text file

Sep 17, 2010
5
0
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.
 
May 20, 2008
3,515
4
Elkridge, MD, USA
---- Original Message ----
From: mdwyer
To: ESFabian@comcast.net
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
---- 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
4,466
88
Albuquerque, NM
prospero.unm.edu
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.
 
Similar threads
Thread starter Title Forum Replies Date
Joe Caverly Documentation Replace internal command with LIBRARY command Support 0
I how to make TCC default/replace cmd.exe? Support 9
x13 TPIPE /REPLACE - Remove line (including EOL) Support 3
T @replace -- what is wrong here Support 2
C Replace 1st argument on command line Support 4
R How to? Replace in Rename Support 9
C How to? @replace[a comma,_,filename] Support 5
MickeyF Can't get my TPIPE /replace to work Support 4
C @replace and @xreplace problems Support 5
C How to? Replace &'s in filenames / FixNames.dll Support 2
M I'm unable to use @replace[] with a % character in string2 Support 12
MikeBaas Strange prob with %@replace.. Support 4
vefatica Back-refs in TPIPE's /replace's replacement string? Support 2
Frank @replace works case sensitive Support 5
J @replace weirdness Support 1
vefatica TPIPE /replace? Support 3
Stefano Piccardi replace tcc process space? Support 8
vefatica @SUBST ... how replace character with a caret? Support 9
B Regex and Replace Support 6
B REPLACE is good news Support 0
J Problem with %var:find=replace% syntax Support 5
D Documentation Help "Startup" page does not describe global lists Support 0
WadeHatler Any way to disable ALL the global hotkeys? Support 8
vefatica GLOBAL /Q? Support 2
fpefpe How to? Global variable set /v Support 4
Patulus GLOBAL command is very slow Support 28
vefatica @SMOPEN and "Global\" Support 3
C How to? GLOBAL question Support 5
P Disable global hotkey Ctrl+Shift+T Support 19
vefatica Dumping global lists to the *sav files Support 17
vefatica GLOBAL Support 4
Stefano Piccardi parsing issue in command GLOBAL Support 3
vefatica Aliases global vs. local Support 12
D Directory history file and global directory history Support 23
C sharing global histories between different TCMD versions? Support 5
vefatica Sorting the global dir history Support 13
vefatica Tab (^t) in @FILEWRITE's text Support 2
R Bug TPIPE's pdf to text conversions don't work Support 2
Joe Caverly Using TYPE with non-English text Support 22
M Goto fails when a text endtext block precedes the code Support 5
Joe Caverly No blank line in TEXT...ENDTEXT in a LIBRARY function Support 8
S INPUT fails if the entered text contains pair of square brackets Support 6
Alpengreis List command: text truncated in find box (german) Support 9
vefatica Text invisible in v25 Support 10
S How to? What's the maximum size of the thread text ? Support 5
E Text copy bug Support 1
S FFIND text that includes " Support 7
S Setting Tabs=Bottom makes text turn black Support 6
Joe Caverly Multiple Text Searches at once using FFIND or TPIPE Support 4
AndrewJ TakeCommand v23 + ANSI color sequences leads to black on black text Support 6

Similar threads