Is there a function in VB.NET which will count how many files there are in a Text File? If not, does anyone know of some code I can use to do this?
Many thanks.
[EDIT]
Nevermind guys, I found this:
VB Code:
Dim sr As StreamReader = File.OpenText("file.txt") Dim LineCount As Integer = 0 While Not (sr.ReadLine() Is Nothing) LineCount += 1 End While
which works fine![]()





Reply With Quote