Calculate Total File Size


/ Published in: C#
Save to your folder(s)



Copy this code and paste it in your HTML
  1. public int CalculateTotalFileSize(string[] path)
  2. {
  3. int sumFileSize = 0;
  4. foreach(string onePath in path)
  5. {
  6. FileInfo info = new FileInfo(onePath);
  7. sumFileSize += Convert.ToInt32(info.Length);
  8. }
  9. return sumFileSize;
  10. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.