I have a log file that I'm looking to parse. I only care about the last entry. 
Is it possible to read in the file, then loop over it from the end, rather than 
the beginning? Here's the code I've got right now. It works well, but why loop 
over parts that aren't needed right?
 
<cfscript>
    VARIABLES.delimiter = '********************';
    VARIABLES.logfilepath = ExpandPath(log.txt');
    VARIABLES.myfile = FileOpen(VARIABLES.logfilepath, "read");
    while (! FileIsEOF(VARIABLES.myfile)) {
        x = FileReadLine(VARIABLES.myfile);
    }
</cfscript>


Andy Matthews 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:304877
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to