Mind sharing witht he rest of us how you did it?? was it with the code below?
T. -----Original Message----- From: Houk, Gary [mailto:[EMAIL PROTECTED]] Sent: Friday, April 19, 2002 9:57 AM To: CF-Talk Subject: RE: manipulating a text file... Thanks for your help everyone!!! I got it working. The boss will be happy now ;-) - Gary -----Original Message----- From: Jerry Johnson [mailto:[EMAIL PROTECTED]] Sent: Friday, April 19, 2002 10:49 AM To: CF-Talk Subject: RE: manipulating a text file... Give it a try. You know you want to. Worse that can happen is it will take your system down. I am sure that's happened before, anyway. Double check the len-172 code in the right below. Something like... <cffile action="READ" file="#fileName#" variable="fileContent"> <cfset newContent=""> <cfloop index="row" list="#fileContent#" delimiters="#chr(10)#"> <cfset newContent=listAppend(newContent,left(row,172)&modelNumber&right(row,len (row)-172),"#chr(10)#")> </cfloop> <cffile action="WRITE" file="#fileName#" output="#newContent#" addnewline="No"> Who ned a screwdriver when you've got a CF hammer? Jerry Johnson >>> [EMAIL PROTECTED] 04/19/02 10:33AM >>> you can use cffile, the thing is how big is the file? if it is too big (like 100 meg) it might take awhile and might even crash the system if you don't have enough ram. might actually want to do this in VB if you know it. VB has some very simple fuctions for working with files. Anthony Petruzzi Webmaster 954-321-4703 [EMAIL PROTECTED] http://www.sheriff.org -----Original Message----- From: Houk, Gary [mailto:[EMAIL PROTECTED]] Sent: Friday, April 19, 2002 10:22 AM To: CF-Talk Subject: RE: manipulating a text file... Yeah, if I had more time, I could look into that, but of course this is due by end of day. Is there basically no way that this can be done with cffile? - gary -----Original Message----- From: Mark A. Kruger - CFG [mailto:[EMAIL PROTECTED]] Sent: Friday, April 19, 2002 9:59 AM To: CF-Talk Subject: RE: manipulating a text file... ouch... well, if the file is structured you might try the text based ODBC driver. Personally, I think it would be easier to host the data in a database and export it OUT into a file when it's needed in a file format. Mark -----Original Message----- From: Houk, Gary [mailto:[EMAIL PROTECTED]] Sent: Friday, April 19, 2002 8:53 AM To: CF-Talk Subject: manipulating a text file... I've just been tasked with updating a text file. There are 134,000 records or so in it, and at character postion 172, I need to insert a model number, which is the same for all of the records. Can anyone give me an idea of how to go about doing this and then resave the file with the new data? TIA, - Gary ______________________________________________________________________ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists