日期:2014-05-18 浏览次数:20795 次
FileInfo f; decimal sumFileSize=0; string[] files = Directory.GetFiles(OldPath,"*.txt"); foreach (string file in files) { f = new FileInfo(Path.GetFileName(file)); sumFileSize = sumFileSize + Convert.ToDecimal(f.Length); }
f = new FileInfo(file);