Posted By

jx_boi on 08/31/10


Tagged

file size calculate total


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

galofre
Tyster


Calculate Total File Size


 / Published in: C#
 

  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  

You need to login to post a comment.