DWUTKA at marlow.com
DWUTKA at marlow.com
Tue Jun 1 11:20:10 CDT 2004
How big is the text file? A string variable can handle (I think) 2 million characters, so as long as the text file isn't more then 2 megs, you should just be able to pull the entire thing into a string variable, then use Replace on the tokens, and save the file back. Drew -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Christopher Hawkins Sent: Monday, May 31, 2004 1:20 PM To: accessd at databaseadvisors.com Subject: [AccessD] Replacing multiple tokens in a text file? I suppose the title says it all. ;) Given a text file with numerous (all different) tokens in it, how would I replace them? I mean, I know how to replace tokens in a string, but I've never had to use a text file for a string before. Should I stuff the entire text file into an array and wash it through my detokenizing code until no more tokens are found? Should I read the file line-by-line, replacing tokens as I go? I'm just not sure how to get started here. -Christopher- -- _______________________________________________ AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com