<?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 move a file to folder dynamically in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/script-to-move-a-file-to-folder-dynamically/m-p/55874#M20356</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Worked perfectly!&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 19 Feb 2019 11:15:21 GMT</pubDate>
    <dc:creator>renato_fritola</dc:creator>
    <dc:date>2019-02-19T11:15:21Z</dc:date>
    <item>
      <title>Script to move a file to folder dynamically</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/script-to-move-a-file-to-folder-dynamically/m-p/55872#M20354</link>
      <description>I need a script that moves a file to a folder dynamically. The URL of the folder will be registered in a folder's parent property of the file. The script should take this parameter from the path to where the file should be moved and move it to it. Can someone give me an example of how to do this?Tha</description>
      <pubDate>Fri, 15 Feb 2019 17:46:46 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/script-to-move-a-file-to-folder-dynamically/m-p/55872#M20354</guid>
      <dc:creator>renato_fritola</dc:creator>
      <dc:date>2019-02-15T17:46:46Z</dc:date>
    </item>
    <item>
      <title>Re:  Script to move a file to folder dynamically</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/script-to-move-a-file-to-folder-dynamically/m-p/55873#M20355</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp;Renato Fritola,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you running script as the rule then you will get the document object directly..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="language-javascript line-numbers"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; parentNode&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; document&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;parent&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;SPAN class="comment token"&gt;// getting the parent of the docuemnt  &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; movePath &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; parentNode&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;properties&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"cm:movePath"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;//get the path where you want to move from the property&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="comment token"&gt;// Path should be some thing like this "sites/test/documentLibrary/testFolder" if not then convert something like this..&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; destination &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;companyhome&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;childByNamePath&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;movePath&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;document&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;move&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;destination&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;‍‍‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Plz look in to this bellow links for all the methods and root object you will get in to javascript..&lt;/P&gt;&lt;P&gt;1)&lt;A class="link-titled" href="http://docs.alfresco.com/community/references/API-JS-rootscoped.html" title="http://docs.alfresco.com/community/references/API-JS-rootscoped.html" rel="nofollow noopener noreferrer"&gt;Root objects | Alfresco Documentation&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2)&lt;A class="link-titled" href="http://docs.alfresco.com/community/references/API-JS-ScriptNode.html" title="http://docs.alfresco.com/community/references/API-JS-ScriptNode.html" rel="nofollow noopener noreferrer"&gt;ScriptNode API | Alfresco Documentation&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3)&lt;A href="https://migration33.stage.lithium.com/docs/DOC-5367"&gt;JavaScript API Cookbook&lt;/A&gt;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Thanks&amp;nbsp;&lt;BR /&gt;Shyam Ghodasra&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Feb 2019 06:15:07 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/script-to-move-a-file-to-folder-dynamically/m-p/55873#M20355</guid>
      <dc:creator>shyam_ghodasra</dc:creator>
      <dc:date>2019-02-18T06:15:07Z</dc:date>
    </item>
    <item>
      <title>Re:  Script to move a file to folder dynamically</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/script-to-move-a-file-to-folder-dynamically/m-p/55874#M20356</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Worked perfectly!&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Feb 2019 11:15:21 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/script-to-move-a-file-to-folder-dynamically/m-p/55874#M20356</guid>
      <dc:creator>renato_fritola</dc:creator>
      <dc:date>2019-02-19T11:15:21Z</dc:date>
    </item>
  </channel>
</rss>

