Calculating Total Size of a Directory Using LINQ
Dim totalSize As Decimal = (Aggregate file In New System.IO.DirectoryInfo(“c:\dev\”).GetFiles(“*.*”, IO.SearchOption.AllDirectories) Into Sum(file.Length)) / 1024 / 1024
Musings on software engineering, technology and Aspergers Syndrome.
Hey I found some more references and tutorials at linqhelp.com. Good luck!
tager
August 8, 2008 at 3:58 am