BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

how can I replace a specific string in several files ???

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (VCL Components Usage)
View previous topic :: View next topic  
Author Message
Oren (Halvani.de)
Guest





PostPosted: Fri Jul 25, 2003 11:52 pm    Post subject: how can I replace a specific string in several files ??? Reply with quote



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





PostPosted: Sat Jul 26, 2003 12:37 am    Post subject: Re: how can I replace a specific string in several files ??? Reply with quote



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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (VCL Components Usage) All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.