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

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
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
Highlighted
Senior Member II

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

You can use this webscript to get list.(inbuilt webscript)

https://localhost:8080/alfresco/s/slingshot/doclib/doclist/documents/site/{siteid}/documentLibrary?f...

 

You can create custom webscript to list folder.

https://docs.alfresco.com/5.2/concepts/ws-folderListing-intro.html

Thanks & Regards,
Sanjay
Highlighted
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?

Highlighted
Moderator
Moderator

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

Highlighted
Customer

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.

Highlighted
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.

Highlighted
Senior Member II

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.

Thanks & Regards,
Sanjay
Highlighted
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.

Highlighted
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.

Highlighted
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).