<?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: List all files on dropbox using API v2 in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/List-all-files-on-dropbox-using-API-v2/m-p/234525#M12811</link>
    <description>Calling listFolder with "" to identify root, with recursive=true, and calling back to listFolderContinue as necessary like this is the correct way to list all of the files.</description>
    <pubDate>Fri, 28 Jul 2017 19:00:20 GMT</pubDate>
    <dc:creator>Greg-DB</dc:creator>
    <dc:date>2017-07-28T19:00:20Z</dc:date>
    <item>
      <title>List all files on dropbox using API v2</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/List-all-files-on-dropbox-using-API-v2/m-p/234461#M12803</link>
      <description>&lt;P&gt;I would like to list all files on dropbox using API v2.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Some example with java would be really nice.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Currently I'm doing the following:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;public String syncFiles(DbxClientV2 client) throws ListFolderErrorException, DbxException {

	ListFolderBuilder listFolderBuilder = client.files().listFolderBuilder("");
	ListFolderResult result = listFolderBuilder.withRecursive(true).start();
		
	Logger log = Logger.getLogger("thread");
	log.setLevel(Level.INFO);

	while (true) {

		if (result != null) {
			for ( Metadata entry : result.getEntries()) {
				if (entry instanceof FileMetadata){
					log.info("Added file: "+entry.getPathLower());
				}
			}

			if (!result.getHasMore()) {
				log.info("GET LATEST CURSOR");
				return result.getCursor();
			}

			try {
				result = client.files().listFolderContinue(result.getCursor());
			} catch (DbxException e) {
				log.info ("Couldn't get listFolderContinue");
			}
		}
	}
}&lt;/PRE&gt;
&lt;P&gt;This is working but I don't know if it's the best way to list all files on dropbox.&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 09:20:32 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/List-all-files-on-dropbox-using-API-v2/m-p/234461#M12803</guid>
      <dc:creator>Lechucico</dc:creator>
      <dc:date>2019-05-29T09:20:32Z</dc:date>
    </item>
    <item>
      <title>Re: List all files on dropbox using API v2</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/List-all-files-on-dropbox-using-API-v2/m-p/234525#M12811</link>
      <description>Calling listFolder with "" to identify root, with recursive=true, and calling back to listFolderContinue as necessary like this is the correct way to list all of the files.</description>
      <pubDate>Fri, 28 Jul 2017 19:00:20 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/List-all-files-on-dropbox-using-API-v2/m-p/234525#M12811</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2017-07-28T19:00:20Z</dc:date>
    </item>
  </channel>
</rss>

