Alternatives
Members may post updates or alternatives to this current article in order to show different
approaches or add new features.
You can keep your output consistent with how Windows represents file sizes by using the inbuilt function;StrFormatByteSizeThe following code will dump the files from the root of C:\, Call getFilesAndSizes from a button click or wherever you want. ...
Here is an alternate I like to use. Private Function TranslateFileSize(ByVal size As Double) As String Try Dim filesizename() As String = {" Bytes", " KB", " MB", " GB", " TB", " PB", " EB", " ZB", " YB"} Dim pow As Double = Math.Floor(Math.Log(size,...
I loves Microsoft .NET.
I develop both windows and ASP.NET application using VB.NET and C#.