cancel
Showing results for 
Search instead for 
Did you mean: 

getting all subfolders through webscript

kayan
Champ in-the-making
Champ in-the-making
Hi

How can I able to get all sub folders through webscript? As for example I want to get all the folders and sub-folders recursively under the Company home.

Any help will be appreciate.

Thanks.
2 REPLIES 2

dnind
Champ in-the-making
Champ in-the-making
Firstly, I'm not a web script expert by any stretch of the imagination - I am just learning myself.

However, you may find that the sample folder web script will provide a starting point.  This is accessible at:
http://localhost:8080/alfresco/service/sample/folder/Company%20Home

You can list all the working webscripts available at:
http://localhost:8080/alfresco/service/index

The source for the sample scripts are in the repository under Data Dictionary > Web Scripts.

The tutorial,"Intro to the Web Script Framework", is a great way to get started.  This is available at:
http://ecmarchitect.com/alfresco-developer-series

Hope this helps.

simon
Champ in-the-making
Champ in-the-making
Hey kayan,

I use Lucene to get a recursive list of all the subfolders. Be carefull, a recursive search in the Company Home folder uses a lot of resources if your data grows. The dubble slash with star indicates "all recursive children":

children = search.luceneSearch("PATH:\"/app:company_home//*\"");
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.