Mega Code Archive
FileInfo Length Property tells the size, in bytes, of the current file
Imports System
Imports System.IO
Public Class FileLength
Public Shared Sub Main()
Dim di As New DirectoryInfo("c:\")
Dim fiArr As FileInfo() = di.GetFiles()
Dim f As FileInfo
Console.WriteLine("{0} contains the following files:", di.Name)
For Each f In fiArr
Console.WriteLine("The size of {0} is {1} bytes.", f.Name, f.Length)
Next f
End Sub
End Class