Finding Lines in a file/end of file

Results 1 to 2 of 2

Thread: Finding Lines in a file/end of file

  1. #1
    Don Botten Guest

    Default Finding Lines in a file/end of file

    eof doesn&#039t work in asp, so How can I detect the end of a file in a loop. Also, is there an easy way to discover how many lines of text are in a file?

  2. #2
    Join Date
    Dec 1969
    Posts
    127

    Default RE: Finding Lines in a file/end of file

    To loop until you reach the end of a file, open the file as you normally do using the FileSystemObject, then use <BR><BR>While Not myFile.AtEndOfStream<BR> --> Code<BR>Wend<BR><BR>As for counting the number of lines, the only way to do it that I can think of would be to keep looping and count as you go. It&#039s not like a database where you can know the number of rows/records up front.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •