<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to get how many folders and sub folders are present in a site ? in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/how-to-get-how-many-folders-and-sub-folders-are-present-in-a/m-p/86524#M26157</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please, never recommend using the luceneSearch operation. That operation is a legacy holdover from Alfresco 2.x/3.x. Lucene is no longer the primary search language, and since Alfresco 4.x has not received any of the various performance improvements that have been accorded to FTS / CMIS. Ideally, only ever use the generic query() operation and specifically use the "fts-alfresco" or "cmis-strict"/"cmis-alfresco" query languages.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 30 Jul 2019 05:47:06 GMT</pubDate>
    <dc:creator>afaust</dc:creator>
    <dc:date>2019-07-30T05:47:06Z</dc:date>
    <item>
      <title>How to get how many folders and sub folders are present in a site ?</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-get-how-many-folders-and-sub-folders-are-present-in-a/m-p/86514#M26147</link>
      <description>can anyone help me in this..</description>
      <pubDate>Thu, 25 Jul 2019 06:48:26 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-get-how-many-folders-and-sub-folders-are-present-in-a/m-p/86514#M26147</guid>
      <dc:creator>raju_gonda</dc:creator>
      <dc:date>2019-07-25T06:48:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to get how many folders and sub folders are present in a site ?</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-get-how-many-folders-and-sub-folders-are-present-in-a/m-p/86515#M26148</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use lucene search for searching all the content of type cm:folder for that particular site and then just get the length of the result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var result = lucene.search("-----Your Query----");&lt;/P&gt;&lt;P&gt;var a = result.length;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Yash&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jul 2019 08:00:40 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-get-how-many-folders-and-sub-folders-are-present-in-a/m-p/86515#M26148</guid>
      <dc:creator>yash_patel_c2</dc:creator>
      <dc:date>2019-07-25T08:00:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to get how many folders and sub folders are present in a site ?</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-get-how-many-folders-and-sub-folders-are-present-in-a/m-p/86516#M26149</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use the following javascript code and execute it in a recursive way.&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;var site = companyhome.childByNamePath("Sites/&amp;lt;site-name&amp;gt;/documentLibrary");&lt;BR /&gt;var count = site.children.length;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;The above code will give you the number of children present in documentLibrary.&lt;/P&gt;&lt;P&gt;You can use the same to get the subfolders.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kintu&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.contcentric.com" rel="nofollow noopener noreferrer"&gt;ContCentric&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jul 2019 08:40:50 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-get-how-many-folders-and-sub-folders-are-present-in-a/m-p/86516#M26149</guid>
      <dc:creator>kintu_barot</dc:creator>
      <dc:date>2019-07-25T08:40:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to get how many folders and sub folders are present in a site ?</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-get-how-many-folders-and-sub-folders-are-present-in-a/m-p/86517#M26150</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't know javascript, can you pls give me the code with recursive logic and also give me the URL pattern for this&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jul 2019 08:54:16 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-get-how-many-folders-and-sub-folders-are-present-in-a/m-p/86517#M26150</guid>
      <dc:creator>raju_gonda</dc:creator>
      <dc:date>2019-07-25T08:54:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to get how many folders and sub folders are present in a site ?</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-get-how-many-folders-and-sub-folders-are-present-in-a/m-p/86518#M26151</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Yash..!!&lt;/P&gt;&lt;P&gt;I have no idea about lucene&amp;nbsp;search can tell me the alternate way for getting folders and sub folders&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jul 2019 10:08:36 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-get-how-many-folders-and-sub-folders-are-present-in-a/m-p/86518#M26151</guid>
      <dc:creator>raju_gonda</dc:creator>
      <dc:date>2019-07-25T10:08:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to get how many folders and sub folders are present in a site ?</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-get-how-many-folders-and-sub-folders-are-present-in-a/m-p/86519#M26152</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use the following code:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;var site = companyhome.childByNamePath("Sites/test/documentLibrary");&lt;BR /&gt;var children = site.children;&lt;BR /&gt;var numberOfChildren = site.children.length;&lt;BR /&gt;var count = 0;&lt;/P&gt;&lt;P&gt;for (var index = 0; index &amp;lt; numberOfChildren; index++) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(children[index].isContainer){&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;c = children[index].children.length;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;count = count + c + 1;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;} else {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//uncomment following line if you want to count the document as well&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//count = count +1;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR /&gt;}&lt;BR /&gt;logger.log(count);&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I hope you know where to use it.&lt;/P&gt;&lt;P&gt;Note: replace the 'test' with your site name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kintu&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.contcentric.com" rel="nofollow noopener noreferrer"&gt;ContCentric&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jul 2019 11:17:42 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-get-how-many-folders-and-sub-folders-are-present-in-a/m-p/86519#M26152</guid>
      <dc:creator>kintu_barot</dc:creator>
      <dc:date>2019-07-25T11:17:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to get how many folders and sub folders are present in a site ?</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-get-how-many-folders-and-sub-folders-are-present-in-a/m-p/86520#M26153</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It is giving wrong count &lt;img id="smileysad" class="emoticon emoticon-smileysad" src="https://connect.hyland.com/i/smilies/16x16_smiley-sad.png" alt="Smiley Sad" title="Smiley Sad" /&gt;&lt;/P&gt;&lt;P&gt;Can you once check?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jul 2019 12:32:11 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-get-how-many-folders-and-sub-folders-are-present-in-a/m-p/86520#M26153</guid>
      <dc:creator>raju_gonda</dc:creator>
      <dc:date>2019-07-25T12:32:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to get how many folders and sub folders are present in a site ?</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-get-how-many-folders-and-sub-folders-are-present-in-a/m-p/86521#M26154</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It counts 'documentLibrary' folder as well.&lt;/P&gt;&lt;P&gt;And it is for two levels only, you can use it recursively.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kintu&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.contcentric.com" rel="nofollow noopener noreferrer"&gt;ContCentric&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jul 2019 12:46:50 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-get-how-many-folders-and-sub-folders-are-present-in-a/m-p/86521#M26154</guid>
      <dc:creator>kintu_barot</dc:creator>
      <dc:date>2019-07-25T12:46:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to get how many folders and sub folders are present in a site ?</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-get-how-many-folders-and-sub-folders-are-present-in-a/m-p/86522#M26155</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kintu Barot,&lt;/P&gt;&lt;P&gt;Thanks for your answer.&lt;/P&gt;&lt;P&gt;if we don't know the how many levels in a particular site,&amp;nbsp;how can we write recursive logic..?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jul 2019 10:43:38 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-get-how-many-folders-and-sub-folders-are-present-in-a/m-p/86522#M26155</guid>
      <dc:creator>raju_gonda</dc:creator>
      <dc:date>2019-07-26T10:43:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to get how many folders and sub folders are present in a site ?</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-get-how-many-folders-and-sub-folders-are-present-in-a/m-p/86523#M26156</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Similar question was asked earlier:&amp;nbsp;&lt;A _jive_internal="true" href="https://community.alfresco.com/message/846309-re-can-anyone-help-me-with-custom-webscript-for-finding-the-number-of-folders-and-sub-folders-present-in-a-given-site?commentID=846309#comment-846309" rel="nofollow noopener noreferrer"&gt;https://community.alfresco.com/message/846309-re-can-anyone-help-me-with-custom-webscript-for-finding-the-number-of-folders-and-sub-folders-present-in-a-given-site?commentID=846309#comment-846309&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jul 2019 13:06:40 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-get-how-many-folders-and-sub-folders-are-present-in-a/m-p/86523#M26156</guid>
      <dc:creator>abhinavmishra14</dc:creator>
      <dc:date>2019-07-26T13:06:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to get how many folders and sub folders are present in a site ?</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-get-how-many-folders-and-sub-folders-are-present-in-a/m-p/86524#M26157</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please, never recommend using the luceneSearch operation. That operation is a legacy holdover from Alfresco 2.x/3.x. Lucene is no longer the primary search language, and since Alfresco 4.x has not received any of the various performance improvements that have been accorded to FTS / CMIS. Ideally, only ever use the generic query() operation and specifically use the "fts-alfresco" or "cmis-strict"/"cmis-alfresco" query languages.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Jul 2019 05:47:06 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-get-how-many-folders-and-sub-folders-are-present-in-a/m-p/86524#M26157</guid>
      <dc:creator>afaust</dc:creator>
      <dc:date>2019-07-30T05:47:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to get how many folders and sub folders are present in a site ?</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-get-how-many-folders-and-sub-folders-are-present-in-a/m-p/86525#M26158</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the clarification!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Jul 2019 05:50:43 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-get-how-many-folders-and-sub-folders-are-present-in-a/m-p/86525#M26158</guid>
      <dc:creator>yash_patel_c2</dc:creator>
      <dc:date>2019-07-30T05:50:43Z</dc:date>
    </item>
  </channel>
</rss>

