Can't do a readln with cffile. Instead, try something like this
<cfscript>
filename = "/Users/Richard/Music/iTunes/iTunes Music Library.xml";
fileReader = createObject("java", "java.io.FileReader");
fileReader = fileReader.init(filename);
lineReader = createObject("java","java.io.LineNumberReader");
lineReader = lineReader.init(fileReader);
line = lineReader.readLine();
while (isDefined("line")) {
lineCount = lineCount + 1;
// do something here with the data in variable line
line = lineReader.readLine();
}
</cfscript>
HTH
Dick
On Jul 19, 2004, at 10:55 AM, Terry Troxel wrote:
> I have a dos log file I want to use CFFILE to read in one line at a
> time
> and append that line to a field in an access table.
> I sure could use an example using CFFILE read and CFFILE write
> to accomplish this.
> I am having trouble parsing the lines as there are no delimiters other
> then the linefeed at least I think it is a linefeed It's the wield
> backwards P
>
> Terry Troxel
>
[Todays Threads]
[This Message]
[Subscription]
[Fast Unsubscribe]
[User Settings]
[Donations and Support]
- Re: cfmail Thomas Chiverton
- Cfmail Stevo Vee
- RE: Cfmail Dave Phillips
- Re: Cfmail Stevo Vee
- Re: Cfmail Stevo Vee
- cfmail Simon Whittaker
- RE: cfmail Burns, John D
- Re: cfmail Simon Whittaker
- CFFILE READ one line at a time Terry Troxel
- RE: CFFILE READ one line at a time Paul Vernon
- Re: CFFILE READ one line at a time Dick Applebaum
- Re: CFFILE READ one line at a time Novak Banda
- Re: CFFILE READ one line at a time Michael Dinowitz
- RE: CFMail Ryan Duckworth
- RE: CFMail Trevor Holm-Laursen
- Re: CFMail Matt Robertson
- RE: CFMail Ryan Duckworth
- Re: CFMail Matt Robertson
- cfmail Tangorre, Michael
- Re: cfmail Jochem van Dieten
- RE: cfmail Andrew Dixon