is there already some way to do this in text pad?
i'd like search and replace to work "across multiple files" (with recursive file searching).
search and replace across multiple files?
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
-
Ed
Re: search and replace across multiple files?
File->close all
Search->"Find in Files"
Select all (Ctrl-A)
Right-Mouse-Click
Open All
Search->Replace
Select Scope: "All documents" and "Replace All"
Search->"Find in Files"
Select all (Ctrl-A)
Right-Mouse-Click
Open All
Search->Replace
Select Scope: "All documents" and "Replace All"
-
Dan Eliot
Re: search and replace across multiple files?
What Ed said:
File->close all
Search->"Find in Files"
Select all (Ctrl-A)
Right-Mouse-Click
Open All
Search->Replace
Select Scope: "All documents" and "Replace All"
An additional comment:
Only the last two steps are necessary if the files are already open in TextPad (ie: you know which files contain the text you want to replace). Also, you will notice an asterisk * next to each file that TextPad did an actual replacement within. After your multi-file replace, make sure to FILE --> SAVE ALL.
Dan
File->close all
Search->"Find in Files"
Select all (Ctrl-A)
Right-Mouse-Click
Open All
Search->Replace
Select Scope: "All documents" and "Replace All"
An additional comment:
Only the last two steps are necessary if the files are already open in TextPad (ie: you know which files contain the text you want to replace). Also, you will notice an asterisk * next to each file that TextPad did an actual replacement within. After your multi-file replace, make sure to FILE --> SAVE ALL.
Dan
-
ram
Re: search and replace across multiple files?
hi,
my friend asked me this question yesteraday and i suggested that he use a perl script; but reading the above i hope a solution using trextpad can also be found..
here is the problem:
he has a file containing twocoloumns, all occurances of the word ib the first coloumn have to be replaced with the word in the second ;
the number of rows in this file is more than two hundred;
this operation has to be performed on more than thousand files..
.
please do suggest a solution thru textpad ,
thank you
ram
my friend asked me this question yesteraday and i suggested that he use a perl script; but reading the above i hope a solution using trextpad can also be found..
here is the problem:
he has a file containing twocoloumns, all occurances of the word ib the first coloumn have to be replaced with the word in the second ;
the number of rows in this file is more than two hundred;
this operation has to be performed on more than thousand files..
.
please do suggest a solution thru textpad ,
thank you
ram
-
Ed
Re: search and replace across multiple files?
What separates the 2 columns? Give a sample of "before" and "afterwards"
If this is what you have to start with
abc def 1234
hi jkl 5678
mnop qrs
and you want to produce this
def def 1234
jkl jkl 5678
qrs qrs
then this search:
^\(\<[[:graph:]]+\>\)\([[:blank:]]+\)\(\<[[:graph:]]+\>\)
and replace with:
\3\2\3
will do it
(i have a feeling that you will need to "view source" in your browser to see this.)
If this is what you have to start with
abc def 1234
hi jkl 5678
mnop qrs
and you want to produce this
def def 1234
jkl jkl 5678
qrs qrs
then this search:
^\(\<[[:graph:]]+\>\)\([[:blank:]]+\)\(\<[[:graph:]]+\>\)
and replace with:
\3\2\3
will do it
(i have a feeling that you will need to "view source" in your browser to see this.)
-
Ed
Re: search and replace across multiple files?
No, it seems you don't have to "view source" but the search does rely on configure->preferences->Editor->non Posix