William Bartholomew

Musings on software engineering, technology and Aspergers Syndrome.

Calculating Total Size of a Directory Using LINQ

with one comment

Dim totalSize As Decimal = (Aggregate file In New System.IO.DirectoryInfo(“c:\dev\”).GetFiles(“*.*”, IO.SearchOption.AllDirectories) Into Sum(file.Length)) / 1024 / 1024

Written by wbarthol

December 31, 2007 at 12:24 pm

Posted in dotnet, programming

One Response

Subscribe to comments with RSS.

  1. Hey I found some more references and tutorials at linqhelp.com. Good luck!

    tager

    August 8, 2008 at 3:58 am


Leave a Reply