<?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: Script to rename document in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/script-to-rename-document/m-p/281939#M235069</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;it is because space does not refer to the parent of the document.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;What you need to do is :&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;javascript&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;var parentFolderName = document.parent.name;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;document.name = parentFolderName + "-CPF";&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;document.save();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/javascript&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You will have to add some controls to avoid 2 files in the same folder to get the same name, because it's not allowed.&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 27 Aug 2013 14:15:31 GMT</pubDate>
    <dc:creator>ecarbenay</dc:creator>
    <dc:date>2013-08-27T14:15:31Z</dc:date>
    <item>
      <title>Script to rename document</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/script-to-rename-document/m-p/281938#M235068</link>
      <description>Hi all,I need a rule for rename all docs that the name contain CPF to the space.name + "CPF". for this I created the following script:document.name = space.name + "-CPF";document.save();all worked well!but I need to do this for a large number of folders and subfolders, how i make to apply this rule</description>
      <pubDate>Tue, 27 Aug 2013 14:00:45 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/script-to-rename-document/m-p/281938#M235068</guid>
      <dc:creator>deyvson_ti</dc:creator>
      <dc:date>2013-08-27T14:00:45Z</dc:date>
    </item>
    <item>
      <title>Re: Script to rename document</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/script-to-rename-document/m-p/281939#M235069</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;it is because space does not refer to the parent of the document.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;What you need to do is :&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;javascript&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;var parentFolderName = document.parent.name;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;document.name = parentFolderName + "-CPF";&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;document.save();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/javascript&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You will have to add some controls to avoid 2 files in the same folder to get the same name, because it's not allowed.&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Aug 2013 14:15:31 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/script-to-rename-document/m-p/281939#M235069</guid>
      <dc:creator>ecarbenay</dc:creator>
      <dc:date>2013-08-27T14:15:31Z</dc:date>
    </item>
    <item>
      <title>Re: Script to rename document</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/script-to-rename-document/m-p/281940#M235070</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank ecarbenay, worked great!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;About duplication I will not have problems because I only need one copy of each document.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks !!! &lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Aug 2013 14:32:09 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/script-to-rename-document/m-p/281940#M235070</guid>
      <dc:creator>deyvson_ti</dc:creator>
      <dc:date>2013-08-27T14:32:09Z</dc:date>
    </item>
  </channel>
</rss>

