Works fine for me...
Code:ListBox1.Items.AddRange(IO.Directory.GetDirectories("Z:\Documents")) Dim dirSize As Long = ListBox1.Items.Cast(Of String).Sum(Function(s) (From strFile In My.Computer.FileSystem.GetFiles(s, FileIO.SearchOption.SearchAllSubDirectories) Select New IO.FileInfo(strFile).Length).Sum()) MsgBox(((dirSize / 1024) / 1024) / 1024)![]()




Reply With Quote
