Results 1 to 24 of 24

Thread: Read Number of Lines in txt file [RESOLVED]

Threaded View

  1. #10
    Fanatic Member brown monkey's Avatar
    Join Date
    Jun 2004
    Location
    Cebu
    Posts
    552
    this mate?
    VB Code:
    1. Dim sr As New StreamReader("D:\My Documents\Docs\pautot.txt")
    2.       MessageBox.Show(Regex.Matches(sr.ReadToEnd, "\n").Count + 1)  ' plus 1 cause no \n in the last line
    Last edited by brown monkey; Jul 25th, 2004 at 08:54 PM.

Posting Permissions

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



Click Here to Expand Forum to Full Width