John Wheal John Wheal - 5 months ago 12
Vb.net Question

Determining file size in VB.NET

How do I determine the size of a text file?

I know that I could just count characters, but the file will be several MB's large.

Answer
Dim myFile As New FileInfo("file.txt")
Dim sizeInBytes As Long = myFile.Length
Comments