public long DirectorySize( string strDirectory)
{
if ( ! Directory . Exists(strDirectory)) return 0 ;
long vReturn = 0 ;
foreach ( string vFile in Directory . GetFiles(strDirectory))
{
FileInfo vFileInfo = new FileInfo (vFile);
vReturn += vFileInfo . Length;
}
foreach ( string vDirectory in Directory . GetDirectories(strDirectory))
vReturn += DirectorySize(vDirectory);
return vReturn;
}