 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Oren (Halvani.de) Guest
|
Posted: Fri Jul 25, 2003 11:52 pm Post subject: how can I replace a specific string in several files ??? |
|
|
hi dear builders, me again...
I've got a question...how can I replace a specific string in several files
???
The below code works fine for ONE file...BUT how can I automate this
function
for handling several files ?
For example via TOpenDialog and the option-parameter:
"ofAllowMultiSelect"...???
/***********************************************************/
void __fastcall TForm1::cmdReplaceStrings(TObject *Sender)
{
AnsiString SuchenString = txtSuchen->Text;
AnsiString ErstzenString = txtErstzen->Text;
Memo1->Lines->Text = StringReplace(Memo1->Lines->Text,
SuchenString,ErstzenString, TReplaceFlags() << rfReplaceAll);
}
/***********************************************************/
Any ideas...?
Thanks for any hint on this problem...
Oren
|
|
| Back to top |
|
 |
Oren (Halvani.de) Guest
|
Posted: Sat Jul 26, 2003 12:37 am Post subject: Re: how can I replace a specific string in several files ??? |
|
|
Hi Liz,
Nice to hear from your I remember you years ago :-)
Can you send me maybe some lines that show me how the handle the problem ?
Oren
"Liz Albin" <lizalbin (AT) yahooNotThis (DOT) com> schrieb im Newsbeitrag
news:3f21cc14$1 (AT) newsgroups (DOT) borland.com...
| Quote: | On Sat, 26 Jul 2003 01:52:59 +0200, Oren (Halvani.de) wrote:
You could go through the Files property (it's a TStrings, each element
of it's Strings property is a file name) and load each of those, then
apply your function.
--
liz
|
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|