How to find how many folders and documents are present in a site?

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
madhu_sudireddy
Active Member

How to find how many folders and documents are present in a site?

How to find how many folders and documents are present in a site?

Can someone please help with this?

11 Replies
sanjaybandhniya
Senior Member

Re: How to find how many folders and documents are present in a site?

madhu_sudireddy
Active Member

Re: How to find how many folders and documents are present in a site?

If alfresco has a web script for getting number of folders in a site, can you please share?

Moderator
Moderator

Re: How to find how many folders and documents are present in a site?

cesarista
Advanced

Re: How to find how many folders and documents are present in a site?

Hi:

Just put in Alfresco Share Search. For documents:

SITE:"shortsitename" and TYPE:"cm:content"

For folders:

SITE:"shortsitename" and TYPE:"cm:folder"

The number of documents or folders is shown in the first page of the results of the search. You can use only TYPE: if you select SITE context in Alfresco Search or selecting site facet. 

You can use REST API too:

https://www.zylk.net/es/web-2-0/blog/-/blogs/listing-thousands-of-noderefs-with-alfresco-rest-api

Kind regards.

--C.

madhu_sudireddy
Active Member

Re: How to find how many folders and documents are present in a site?

With this web script, i'm only getting count of folders in document library not their sub folders, I need to get the sub-folders count also included, sorry din't mention it before.

sanjaybandhniya
Senior Member

Re: How to find how many folders and documents are present in a site?

For that type of structure,you have to create your own script.

raju_gonda
Member II

Re: How to find how many folders and documents are present in a site?

this is only giving the folders in document library not sub folders , can you provide me the script for sub folders count also.

madhu_sudireddy
Active Member

Re: How to find how many folders and documents are present in a site?

Hi,

The result of document count using the webscript you have sent me is showing max 1000 counts only, is there any way to get the correct count(i.e more than 1000).

The sites with under 1000 document is showing correct count.

Sanjana_17
Active Member

Re: How to find how many folders and documents are present in a site?

How can one use this api in java code, I have similar kind of requirement and I tried calling this api through the code but could not achieve this due to authentication issue(401 error).