How would I count the lines of a text file situated on a server?
I know that if the file is on my pc I just do this:
But what about if the file is on a server such as "http://www.mywebsite.com/mytextfile.txt"?Code:Dim lines As String() = IO.File.ReadAllLines("C:\mytextfile.txt") msgbox("The text file has " & lines.Length & " lines.")
If try to download the file in memory and read it, it works fine:
But I just cannot find a way to count its lines.Code:Dim textfilet As String = client.DownloadString("http://www.mywebsite.com/mytextfile.txt") MsgBox(textfile)
Thank you in advance,
Andrea




Reply With Quote
