Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Dim Based_Path As String = CStr("C:\Some\Random\Path")
- Dim KB_Files As Integer = CInt(System.IO.Directory.GetFiles(Based_Path).Length())
- KB_Size = (From strFile In My.Computer.FileSystem.GetFiles(Based_Path, _
- FileIO.SearchOption.SearchAllSubDirectories) _
- Select New System.IO.FileInfo(strFile).Length).Sum()
- Dim i As New StringBuilder
- i.AppendLine(String.Format("{0} Files", KB_Files))
- i.AppendLine(String.Format("{0} GB", KB_To_GB(KB_Size)))
- Virtual_Stats.Text = CStr(i.ToString)
Advertisement
Add Comment
Please, Sign In to add comment