<?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 Tagging Files in a folder with the name of the folder in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/tagging-files-in-a-folder-with-the-name-of-the-folder/m-p/266784#M219914</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Please help me to write a script that can help me to tag file in a folder with its folder name and its parent folders as well..&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; :roll:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So if a fil in the folder hierarchy &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Multimedia—&amp;gt; Audio—&amp;gt; Song.mp3&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The song.mp3 file will have tags Multimedia and Audio&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 03 May 2012 07:18:13 GMT</pubDate>
    <dc:creator>bharat_bang</dc:creator>
    <dc:date>2012-05-03T07:18:13Z</dc:date>
    <item>
      <title>Tagging Files in a folder with the name of the folder</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/tagging-files-in-a-folder-with-the-name-of-the-folder/m-p/266784#M219914</link>
      <description>Please help me to write a script that can help me to tag file in a folder with its folder name and its parent folders as well.. :roll&lt;IMG id="smileyfrustrated" class="emoticon emoticon-smileyfrustrated" src="https://migration33.stage.lithium.com/i/smilies/16x16_smiley-frustrated.png" alt="Smiley Frustrated" title="Smiley Frustrated" /&gt;o if a fil in the folder hierarchy Multimedia—&amp;gt; Audio—&amp;gt; Song.mp3The song.mp3 file will have tags Multimedia and Audio</description>
      <pubDate>Thu, 03 May 2012 07:18:13 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/tagging-files-in-a-folder-with-the-name-of-the-folder/m-p/266784#M219914</guid>
      <dc:creator>bharat_bang</dc:creator>
      <dc:date>2012-05-03T07:18:13Z</dc:date>
    </item>
    <item>
      <title>Re: Tagging Files in a folder with the name of the folder</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/tagging-files-in-a-folder-with-the-name-of-the-folder/m-p/266785#M219915</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Given the &lt;/SPAN&gt;&lt;A href="http://wiki.alfresco.com/wiki/JavaScript_API" rel="nofollow noopener noreferrer"&gt;API documentation&lt;/A&gt;&lt;SPAN&gt;, you should be able to figure this out. Here are some hints:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; - The parent of a node (the node's folder) can be found by accessing the "parent" property of a node, like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;content.parent&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;SPAN&gt; - Same for the parent's parent.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; - The name of a node can be accessed through the name property, like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;folder.name&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;SPAN&gt; - A tag can be added to a node by calling addTag and passing in the name of the tag, like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;content.addTag('someFolder')&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;If you try this and fail, please come back with your code and the error message you are receiving and someone will help you.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Jeff&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 May 2012 20:05:13 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/tagging-files-in-a-folder-with-the-name-of-the-folder/m-p/266785#M219915</guid>
      <dc:creator>jpotts</dc:creator>
      <dc:date>2012-05-03T20:05:13Z</dc:date>
    </item>
  </channel>
</rss>

