开发者

Getting size of document libraries in site collection

I'm trying to get a list of the size of all the document libraries in my site collection. I don't have access to central admin, and I don't have access to the serv开发者_如何学运维er so I can't hit the object model. I am a site collection administrator and I can access the web services.

The data I want is actually here: _layouts/storman.aspx, except I can only view 100 libraries.

Other code I've found that does what I want is this:

using (SPSite site = new SPSite("http://servername"))
{
    DataTable tbl;
    tbl = site.StorageManagementInformation(
        SPSite.StorageManagementInformationType.DocumentLibrary,
        SPSite.StorageManagementSortOrder.Decreasing,
        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());
        }
    }
}  

Since I can't run code on the server, can anyone point me to a web service that exposes this same functionality? I can't find it for the life of me.

Enabling more than 100 rows in the above-referenced report would also work great.


Did you try the explorer view, and the windows property window ?

In fact, you may try (a guess, I never did it) to use webdav protocol. It may contains what you are looking for.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜