This project has moved and is read-only. For the latest updates, please go here.

List Size

May 13, 2014 at 2:55 PM
Does anyone know of a way to get the size of a list using SPServices?
May 13, 2014 at 3:08 PM
Size meaning what? Number of items? Bytes?

May 13, 2014 at 3:35 PM
Edited May 13, 2014 at 3:59 PM
Bytes, I have done this for the document libraries but I don't see any way to get the size in bytes for lists or list items. Trying to discover where the most space is being used accross a site collection.
May 13, 2014 at 5:46 PM
I would assume with a Document Library that you simply looped through the items and added up to byte counts? I think you could do something similar with a list, but there you would probably be more interested in the attachment sizes.

May 14, 2014 at 3:11 PM
I may be missing something here but have you tried https://domain/sites/sitename/_layouts/storman.aspx at the site collection top level? It has selectors for document libraries, lists, and individual documents for the entire site collection.

May 14, 2014 at 3:34 PM
Edited May 14, 2014 at 3:36 PM
Marc, you are correct that is how I am getting the document library sizes. The issue is that the size field isn't available if you specify a list. Code sample below.
$(document).ready(function() {
    operation: "GetListItems",
    async: false,
    listName: "Tasks",
    CAMLViewFields: "<ViewFields><FieldRef Name='FileSizeDisplay' /></ViewFields>",
    completefunc: function (xData, Status) {
      $(xData.responseXML).SPFilterNode("z:row").each(function() {
        var liHtml = "<li>" + $(this).attr("ows_FileSizeDisplay") + "</li>";
I think the real problem I am having is finding documtation on what attributes are available for the operation I am using. I found this blog which helped a lot for GetListCollection but I can't find other list of available attributes for other operations. You would think Microsoft would have this somewhere on there site.

Geoff, storman only displays up to 100 lists and we have thousands so that is not an option. Plus it is missing additional fields liked who and when it was created.
May 14, 2014 at 3:47 PM
Marc, I just noticed you mentioned attachments and most of the lists in the site collection do not have any. I am looking for the overall size of a list, just like in storman as Geoff mentioned but I need the ability to add additional fields and display more than 100 lists.