static protected internal long CountFolderLength(string FolderPath)
{
long folder_length = 0;
System.IO.DirectoryInfo di = new System.IO.DirectoryInfo(FolderPath);
System.IO.FileInfo[] fis = di.GetFiles();
foreach (System.IO.FileInfo fi in fis)
folder_length += fi.Length;
System.IO.DirectoryInfo[] dis = di.GetDirectories();
foreach (System.IO.DirectoryInfo cdi in dis)
{
folder_length += CountFolderLength(cdi.FullName);
}
return folder_length;
}