cancel
Showing results for 
Search instead for 
Did you mean: 

Count files of a Site

jficheux
Confirmed Champ
Confirmed Champ
Hi,
I have to do a report with the number of documents uploaded in a site every moth and extract some information as last modified date, who has upload the file, etc
But I've been looking for this forum and I can't find the correct answer. Even I've been looking into the code application where is called the filter All Documents that appears on Share in the left corner of the application. But I haven't found anything.
I've taken a look over the database tables, but I don't understand them
Could anyone help me, please?
Thanks in advance.

JESI
3 REPLIES 3

mrogers
Star Contributor
Star Contributor
If you just need a count of all files in a site once a month then I'd write a script or java class that "walks the tree".

There may well be cleverer ways but that way would work for a minimal effort.

It's clearly an area that needs improvement in future.

sharifu
Confirmed Champ
Confirmed Champ
Has someone done this?

shazada
Star Contributor
Star Contributor
Hi,

I do this manually like:

var count = 0;

recurse(companyhome, function(node) {
    if (node.isDocument)
      count++;
});

logger.log(count);

You'll need the Javascript Console for this to work.