Hi Bob,

I wanted to chime in to agree with the general consensus that <cffile> is
not really suited for parsing large data files.

However, you can use the Windows Scripting FileSystem object (COM) or a
native Java filesystem class to do this..  While it's not necessarrily
beginner level stuff, learning to access these commonly available and
underused resources is something you will use again and again down the line.

That said, there is a UDF at cflib.org that does what you are seeking using
a native Java class:
http://www.cflib.org/udf.cfm?ID=417

The UDF may not work for you; you may not have Java installed on your server
(you should), and you may not have access to do so.

If not, consider doing some research on the Windows FileSystem scripting
object.  This should give you a reasonable performance increase over
<cffile>, and allow you to read in a line at a time as well.

Regards,

Seth

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
Behalf Of Bob Gillham
Sent: Tuesday, January 08, 2002 4:23 PM
To: List@Dfwcfug. Org
Subject: Read a file


Anyone know an easy way to read a file in one line at a time.  And
perhaps stop after so many lines.  I have a 120 meg file that I would
like to read a little of.

Thanks in advance.


-------------------------------------------------------------------------
This email server is running an evaluation copy of the MailShield anti-
spam software. Please contact your email administrator if you have any
questions about this message. MailShield product info: www.mailshield.com

-----------------------------------------------
To post, send email to [EMAIL PROTECTED]
To subscribe / unsubscribe: http://www.dfwcfug.org



-------------------------------------------------------------------------
This email server is running an evaluation copy of the MailShield anti-
spam software. Please contact your email administrator if you have any
questions about this message. MailShield product info: www.mailshield.com

-----------------------------------------------
To post, send email to [EMAIL PROTECTED]
To subscribe / unsubscribe: http://www.dfwcfug.org

Reply via email to