I think I see what's happening... when the file is read with cffile, the variable, "hmls_offices", apparently has all the chr(9)'s, chr(10)'s, and chr(13)'s stripped out.
Do I need some kind of "preserveHTML" function or something? Rick > -----Original Message----- > From: Rick Faircloth [mailto:[EMAIL PROTECTED] > Sent: Wednesday, June 25, 2008 11:40 PM > To: CF-Talk > Subject: RE: Trying to read a text file of data and input into db... > > Oops... list="hmls_offices" should have been list = "#hmls_offices#" > > Now, I get an error stating: > > Expression Exception - in > E:\Inetpub\webroot\c21-ar-homesite\tasks\0_process_hmls_offices_text_file.cfm > : line 14 > Invalid list index 3. > (Index 3 is the "<cfset street_no_street_name... line) > > Thoughts? > > > <cfset filepath = > "e:\inetpub\webroot\real_estate_data\hmls\data\#DateFormat(now(), > 'yyyy_mmdd')#_idx_custom\office.txt"> > > <cffile action = "read" file = "#filepath#" variable = "hmls_offices"> > > <cfset firstline = true> > > <cfloop index = "record" list = "#hmls_offices#" delimiters = "#chr(13)#, > #chr(10)#"> > > <cfif firstline is false> > > <cfset office_id = listgetat(record, 1, "#chr(9)#")> > <cfset office_name = listgetat(record, 2, "#chr(9)#")> > <cfset street_no_street_name = listgetat(record, 3, "#chr(9)#")> > <cfset address_02 = listgetat(record, 4, "#chr(9)#")> > <cfset city = listgetat(record, 5, "#chr(9)#")> > <cfset state = listgetat(record, 6, "#chr(9)#")> > <cfset zipcode = listgetat(record, 7, "#chr(9)#")> > <cfset phone = listgetat(record, 8, "#chr(9)#")> > <cfset fax = listgetat(record, 9, "#chr(9)#")> > <cfset email = listgetat(record, 10, "#chr(9)#")> > > <cfoutput>#record#</cfoutput><br><br> > > <cfoutput> > > office_id = #office_id#<br> > office_name = #office_name#<br> > street_no_street_name = #street_no_street_name#<br> > address_02 = #address_02#<br> > city = #city#<br> > state = #state#<br> > zipcode = #zipcode#<br> > phone = #phone#<br> > fax = #fax#<br> > email = #email#<br> > > </cfoutput> > > <cfelse> > > <cfset firstline = false> > > </cfif> > > </cfloop> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:308167 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

