07-29-2019 03:14 AM
var site = companyhome.childByNamePath("Sites/test/documentLibrary");
var children = site.children;
var numberOfChildren = site.children.length;
var count = 0;
for (var index = 0; index < numberOfChildren; index++) {
if(children[index].isContainer){
c = children[index].children.length;
count = count + c + 1;
} else {
//uncomment following line if you want to count the document as well
//count = count +1;
}
}
logger.log(count);
Explore our Alfresco products with the links below. Use labels to filter content by product module.