Thanks Shawn, that's great. I'm dealing with way below 256. Cheers Moshe
-----Original Message----- From: Shawn K. Hall [mailto:[EMAIL PROTECTED] Sent: Thursday, November 18, 2004 10:25 PM To: [EMAIL PROTECTED] Subject: RE: [ASP] FSO readline Hi Moshe, > Is there a shortcut method of counting the lines > in a txt file by FSO, or is the best/only way to > count the lines first by loop? Depends on the size of the file. In my apps I use a threshold of 256kb - if the file is that large or smaller then I read the entire file into a string variable and split it on vbCrLf, using UBound() to determine how many 'rows' (lines) it creates. Add one and you're done. If you're just enumerating lines in the file anyway, you can use this method with the new string array and play with the contents, too. Regards, Shawn K. Hall http://ReliableAnswers.com/ '// ======================================================== We must believe in free will. We have no choice. --------------------------------------------------------------------- Home : http://groups.yahoo.com/group/active-server-pages --------------------------------------------------------------------- Post : [EMAIL PROTECTED] Subscribe : [EMAIL PROTECTED] Unsubscribe: [EMAIL PROTECTED] --------------------------------------------------------------------- Yahoo! Groups Links ------------------------ Yahoo! Groups Sponsor --------------------~--> $9.95 domain names from Yahoo!. Register anything. http://us.click.yahoo.com/J8kdrA/y20IAA/yQLSAA/17folB/TM --------------------------------------------------------------------~-> --------------------------------------------------------------------- Home : http://groups.yahoo.com/group/active-server-pages --------------------------------------------------------------------- Post : [EMAIL PROTECTED] Subscribe : [EMAIL PROTECTED] Unsubscribe: [EMAIL PROTECTED] --------------------------------------------------------------------- Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/active-server-pages/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
