SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Please help me to compute document library size in sharepoint ?

Regards, Shiva Reddy.p

share|improve this question
up vote 2 down vote accepted

Taken from:

using (SPSite site = new SPSite("http://servername"))
   DataTable tbl;
   tbl = site.StorageManagementInformation(
   SPSite.StorageManagementSortedOn.Size, 100);
   foreach (DataRow row in tbl.Rows)
      foreach (DataColumn column in tbl.Columns)
      MessageBox.Show("Doc Lib Name :" + row["Title"].ToString() + "  Size (bytes): " + row["Size"].ToString());
share|improve this answer
Thanks Brain , i got same solution. The above code will give the document library size.. – shivareddy Oct 11 '10 at 8:36

Try space monitor ( a great free tool to analyse storage used by your entire site.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.