<?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: Searching for all files with certain extension in Java API and some issues with search queries in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Searching-for-all-files-with-certain-extension-in-Java-API-and/m-p/502775#M24874</link>
    <description>&lt;P&gt;[Cross-linking for reference:&amp;nbsp;&lt;A href="https://stackoverflow.com/questions/66518862/dropbox-sdk-java-write-search-query-to-get-all-files" target="_blank"&gt;https://stackoverflow.com/questions/66518862/dropbox-sdk-java-write-search-query-to-get-all-files&lt;/A&gt;&amp;nbsp;]&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The Dropbox API doesn't offer the ability to do a wildcard search like this, but I'll pass this along as a feature request. I can't promise if or when that might be implemented though.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;While not ideal, as a workaround, you could list the full contents using&amp;nbsp;&lt;A href="https://dropbox.github.io/dropbox-sdk-java/api-docs/v3.1.x/com/dropbox/core/v2/files/DbxUserFilesRequests.html#listFolder-java.lang.String-" target="_self"&gt;listFolder&lt;/A&gt;/&lt;A href="https://dropbox.github.io/dropbox-sdk-java/api-docs/v3.1.x/com/dropbox/core/v2/files/DbxUserFilesRequests.html#listFolderBuilder-java.lang.String-" target="_self"&gt;listFolderBuilder&lt;/A&gt;/&lt;A href="https://dropbox.github.io/dropbox-sdk-java/api-docs/v3.1.x/com/dropbox/core/v2/files/DbxUserFilesRequests.html#listFolderContinue-java.lang.String-" target="_self"&gt;listFolderContinue&lt;/A&gt; and filter based on the file extension.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 08 Mar 2021 15:30:56 GMT</pubDate>
    <dc:creator>Greg-DB</dc:creator>
    <dc:date>2021-03-08T15:30:56Z</dc:date>
    <item>
      <title>Searching for all files with certain extension in Java API and some issues with search queries</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Searching-for-all-files-with-certain-extension-in-Java-API-and/m-p/502767#M24873</link>
      <description>&lt;P&gt;Hello!&lt;BR /&gt;&lt;BR /&gt;I'm building a small function in which i want to get metadata from for example all of PDF's and DOC files. So I am using a SearchV2Builder withFileExtension option. But i don't know hot write a query for any string. I tried with regexes, wildcards characters and nothing works.&lt;/P&gt;&lt;P&gt;```&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;private final &lt;/SPAN&gt;String &lt;SPAN&gt;extensions&lt;/SPAN&gt;[] = {&lt;SPAN&gt;"pdf"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;"docx"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;"doc"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;"odt"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;"jpg"&lt;/SPAN&gt;}&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;&lt;BR /&gt;public void &lt;/SPAN&gt;&lt;SPAN&gt;findFile&lt;/SPAN&gt;(String query){&lt;BR /&gt;&lt;SPAN&gt;try&lt;/SPAN&gt;{&lt;BR /&gt;&lt;BR /&gt;SearchV2Builder searchBuilder = &lt;SPAN&gt;client&lt;/SPAN&gt;.files().searchV2Builder(query)&lt;SPAN&gt;;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt; List&amp;lt;String&amp;gt; fileExtensions = Arrays.&lt;SPAN&gt;asList&lt;/SPAN&gt;(&lt;SPAN&gt;extensions&lt;/SPAN&gt;)&lt;SPAN&gt;;&lt;BR /&gt;&lt;/SPAN&gt; SearchOptions searchOptions = SearchOptions.&lt;SPAN&gt;newBuilder&lt;/SPAN&gt;().withFileExtensions(fileExtensions).build()&lt;SPAN&gt;;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt; SearchV2Result searchResult = searchBuilder.withOptions(searchOptions).start()&lt;SPAN&gt;;&lt;BR /&gt;&lt;/SPAN&gt; List&amp;lt;SearchMatchV2&amp;gt; searchMatches = searchResult.getMatches()&lt;SPAN&gt;;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt; System.&lt;SPAN&gt;out&lt;/SPAN&gt;.println(searchMatches.size())&lt;SPAN&gt;;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt; for &lt;/SPAN&gt;(SearchMatchV2 s: searchMatches){&lt;BR /&gt;System.&lt;SPAN&gt;out&lt;/SPAN&gt;.println(s.getMetadata().getMetadataValue().getPathDisplay())&lt;SPAN&gt;;&lt;BR /&gt;&lt;/SPAN&gt; }&lt;BR /&gt;&lt;BR /&gt;}&lt;BR /&gt;&lt;SPAN&gt;catch&lt;/SPAN&gt;(DbxException e){&lt;BR /&gt;e.printStackTrace()&lt;SPAN&gt;;&lt;BR /&gt;&lt;/SPAN&gt; }&lt;BR /&gt;&lt;BR /&gt;}&lt;/PRE&gt;&lt;P&gt;```&lt;/P&gt;&lt;P&gt;So my question is how to write that query? Maybe there is different solution for that. Thanks in advance!&lt;/P&gt;&lt;DIV class="ms-editor-squiggler"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="ms-editor-squiggler"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="ms-editor-squiggler"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="ms-editor-squiggler"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="ms-editor-squiggler"&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Mon, 08 Mar 2021 14:47:09 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Searching-for-all-files-with-certain-extension-in-Java-API-and/m-p/502767#M24873</guid>
      <dc:creator>pojler</dc:creator>
      <dc:date>2021-03-08T14:47:09Z</dc:date>
    </item>
    <item>
      <title>Re: Searching for all files with certain extension in Java API and some issues with search queries</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Searching-for-all-files-with-certain-extension-in-Java-API-and/m-p/502775#M24874</link>
      <description>&lt;P&gt;[Cross-linking for reference:&amp;nbsp;&lt;A href="https://stackoverflow.com/questions/66518862/dropbox-sdk-java-write-search-query-to-get-all-files" target="_blank"&gt;https://stackoverflow.com/questions/66518862/dropbox-sdk-java-write-search-query-to-get-all-files&lt;/A&gt;&amp;nbsp;]&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The Dropbox API doesn't offer the ability to do a wildcard search like this, but I'll pass this along as a feature request. I can't promise if or when that might be implemented though.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;While not ideal, as a workaround, you could list the full contents using&amp;nbsp;&lt;A href="https://dropbox.github.io/dropbox-sdk-java/api-docs/v3.1.x/com/dropbox/core/v2/files/DbxUserFilesRequests.html#listFolder-java.lang.String-" target="_self"&gt;listFolder&lt;/A&gt;/&lt;A href="https://dropbox.github.io/dropbox-sdk-java/api-docs/v3.1.x/com/dropbox/core/v2/files/DbxUserFilesRequests.html#listFolderBuilder-java.lang.String-" target="_self"&gt;listFolderBuilder&lt;/A&gt;/&lt;A href="https://dropbox.github.io/dropbox-sdk-java/api-docs/v3.1.x/com/dropbox/core/v2/files/DbxUserFilesRequests.html#listFolderContinue-java.lang.String-" target="_self"&gt;listFolderContinue&lt;/A&gt; and filter based on the file extension.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Mar 2021 15:30:56 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Searching-for-all-files-with-certain-extension-in-Java-API-and/m-p/502775#M24874</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2021-03-08T15:30:56Z</dc:date>
    </item>
  </channel>
</rss>

