<?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: Correct Way to move folders in batch mode Java API in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Correct-Way-to-move-folders-in-batch-mode-Java-API/m-p/252824#M14597</link>
    <description>&lt;P&gt;To move items in bulk using the&amp;nbsp;Dropbox API v2 Java SDK, you should use &lt;A href="https://dropbox.github.io/dropbox-sdk-java/api-docs/v3.0.x/com/dropbox/core/v2/files/DbxUserFilesRequests.html#moveBatch-java.util.List-" target="_self"&gt;moveBatch&lt;/A&gt;&amp;nbsp;(or &lt;A href="https://dropbox.github.io/dropbox-sdk-java/api-docs/v3.0.x/com/dropbox/core/v2/files/DbxUserFilesRequests.html#moveBatchBuilder-java.util.List-" target="_self"&gt;moveBatchBuilder&lt;/A&gt;) and &lt;A href="https://dropbox.github.io/dropbox-sdk-java/api-docs/v3.0.x/com/dropbox/core/v2/files/DbxUserFilesRequests.html#moveBatchCheck-java.lang.String-" target="_self"&gt;moveBatchCheck&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We don't have a full example of that, but it would look like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;List&amp;lt;RelocationPath&amp;gt; entries = new ArrayList&amp;lt;RelocationPath&amp;gt;();
entries.add(new RelocationPath("/folder1_original_path", "/folder1_new_path"));
entries.add(new RelocationPath("/folder2_original_path", "/folder2_new_path"));
// ... and so on

RelocationBatchLaunch moveBatchJob = client.files().moveBatch(entries);

RelocationBatchJobStatus moveBatchCheck = null;

while (moveBatchCheck == null || moveBatchCheck.isInProgress()) {
    // check this occasionally until it's done
    moveBatchCheck = client.files().moveBatchCheck(moveBatchJob.getAsyncJobIdValue());
    System.out.println(moveBatchCheck);
    Thread.sleep(10000);
}&lt;/PRE&gt;</description>
    <pubDate>Wed, 15 Nov 2017 18:25:04 GMT</pubDate>
    <dc:creator>Greg-DB</dc:creator>
    <dc:date>2017-11-15T18:25:04Z</dc:date>
    <item>
      <title>Correct Way to move folders in batch mode Java API</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Correct-Way-to-move-folders-in-batch-mode-Java-API/m-p/252816#M14596</link>
      <description>&lt;P&gt;Hi. I need to move a lot of folders with files to another shared folder. I need to do that every day using Java API&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But moving a got the messsage "&lt;SPAN&gt;too_many_write_operations&lt;/SPAN&gt;". I read in the doc that we need to do that in batch mode.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Someone have a example to do that?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Dario.&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 09:17:18 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Correct-Way-to-move-folders-in-batch-mode-Java-API/m-p/252816#M14596</guid>
      <dc:creator>Dario_Go</dc:creator>
      <dc:date>2019-05-29T09:17:18Z</dc:date>
    </item>
    <item>
      <title>Re: Correct Way to move folders in batch mode Java API</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Correct-Way-to-move-folders-in-batch-mode-Java-API/m-p/252824#M14597</link>
      <description>&lt;P&gt;To move items in bulk using the&amp;nbsp;Dropbox API v2 Java SDK, you should use &lt;A href="https://dropbox.github.io/dropbox-sdk-java/api-docs/v3.0.x/com/dropbox/core/v2/files/DbxUserFilesRequests.html#moveBatch-java.util.List-" target="_self"&gt;moveBatch&lt;/A&gt;&amp;nbsp;(or &lt;A href="https://dropbox.github.io/dropbox-sdk-java/api-docs/v3.0.x/com/dropbox/core/v2/files/DbxUserFilesRequests.html#moveBatchBuilder-java.util.List-" target="_self"&gt;moveBatchBuilder&lt;/A&gt;) and &lt;A href="https://dropbox.github.io/dropbox-sdk-java/api-docs/v3.0.x/com/dropbox/core/v2/files/DbxUserFilesRequests.html#moveBatchCheck-java.lang.String-" target="_self"&gt;moveBatchCheck&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We don't have a full example of that, but it would look like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;List&amp;lt;RelocationPath&amp;gt; entries = new ArrayList&amp;lt;RelocationPath&amp;gt;();
entries.add(new RelocationPath("/folder1_original_path", "/folder1_new_path"));
entries.add(new RelocationPath("/folder2_original_path", "/folder2_new_path"));
// ... and so on

RelocationBatchLaunch moveBatchJob = client.files().moveBatch(entries);

RelocationBatchJobStatus moveBatchCheck = null;

while (moveBatchCheck == null || moveBatchCheck.isInProgress()) {
    // check this occasionally until it's done
    moveBatchCheck = client.files().moveBatchCheck(moveBatchJob.getAsyncJobIdValue());
    System.out.println(moveBatchCheck);
    Thread.sleep(10000);
}&lt;/PRE&gt;</description>
      <pubDate>Wed, 15 Nov 2017 18:25:04 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Correct-Way-to-move-folders-in-batch-mode-Java-API/m-p/252824#M14597</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2017-11-15T18:25:04Z</dc:date>
    </item>
    <item>
      <title>Re: Correct Way to move folders in batch mode Java API</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Correct-Way-to-move-folders-in-batch-mode-Java-API/m-p/256163#M14833</link>
      <description>&lt;P&gt;Thanks!!!&lt;/P&gt;</description>
      <pubDate>Mon, 11 Dec 2017 13:08:45 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Correct-Way-to-move-folders-in-batch-mode-Java-API/m-p/256163#M14833</guid>
      <dc:creator>Dario_Go</dc:creator>
      <dc:date>2017-12-11T13:08:45Z</dc:date>
    </item>
  </channel>
</rss>

