Might be a good time to dig out the Regular Expressions book so that you only replace the parts you need. Or the extended find / replace in Homesite usually works a treat for me in those sorts of situations ! Depends if you need the replace to be dynamic or not !
Regards Stephen -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 30 September 2003 13:52 To: [EMAIL PROTECTED] Subject: [ cf-dev ] extended replace supposing you had 1000+ files, and you wanted to insert a line of code in all of those, how would you do it? Assuming the files don't have much in common, so can't do a find-and-replace on something like <HTML>. I'm thinking possibly using CFFile to loop through them, reading and writing each file. Incidentally, these are .php files if that makes any difference. I was thinking of replacing "<?php" with "<? php my_code _here ?> <?php", but I don't know if that'll work. It'll also duplicate the code as most of these files have several of these <?php blocks in them. Which shouldn't cause a problem, just means the code is getting called unnecessarily often. Suggestions? Duncan Cumming IT Manager http://www.alienationdesign.co.uk mailto:[EMAIL PROTECTED] Tel: 0141 575 9700 Fax: 0141 575 9600 Creative solutions in a technical world ---------------------------------------------------------------------- Get your domain names online from: http://www.alienationdomains.co.uk Reseller options available! ---------------------------------------------------------------------- ---------------------------------------------------------------------- -- ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] For human help, e-mail: [EMAIL PROTECTED] -- ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] For human help, e-mail: [EMAIL PROTECTED]
