<?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: Python files_search() returns incorrect filenames in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Python-files-search-returns-incorrect-filenames/m-p/167290#M6064</link>
    <description>&lt;P&gt;Hi George, yes, recent changes may not immediately be reflected in search results due to a short delay in indexing. We'll get that clarified in&amp;nbsp;the documentation.&lt;/P&gt;
&lt;P&gt;For this kind of application, you may be better suited by directly checking&amp;nbsp;with &lt;A href="https://dropbox-sdk-python.readthedocs.org/en/master/moduledoc.html#dropbox.dropbox.Dropbox.files_get_metadata" target="_blank" rel="nofollow noreferrer"&gt;files_get_metadata&lt;/A&gt;&amp;nbsp;though. I.e., you can check for&amp;nbsp;'printmessage=1' or&amp;nbsp;'printmessage=0' explicitly.&lt;/P&gt;
&lt;P&gt;Or, you can use &lt;A href="https://dropbox-sdk-python.readthedocs.org/en/master/moduledoc.html#dropbox.dropbox.Dropbox.files_list_folder" target="_blank" rel="nofollow noreferrer"&gt;files_list_folder&lt;/A&gt; to list the parent folder.&lt;/P&gt;</description>
    <pubDate>Sun, 20 Mar 2016 00:46:41 GMT</pubDate>
    <dc:creator>Greg-DB</dc:creator>
    <dc:date>2016-03-20T00:46:41Z</dc:date>
    <item>
      <title>Python files_search() returns incorrect filenames</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Python-files-search-returns-incorrect-filenames/m-p/167289#M6063</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;
&lt;P&gt;I'm using the files_search() function in a Python script to look at the names of files in my app's folder and based on those names, the script&amp;nbsp;will perform certain functions. The script also changes the names of some files using files_move(). I've noticed that when I use files_move() to change filenames, files_search() will sometimes return incorrect results. Here's the sort of thing I'm doing:&lt;/P&gt;
&lt;P&gt;- Have a file called 'printmessage=1' in Dropbox (no file extension)&lt;/P&gt;
&lt;P&gt;- Use files_search()&amp;nbsp;from&amp;nbsp;the&amp;nbsp;Python API in a loop (repeats every 10 seconds) to look for a file with 'printmessage' in its name, and extract the number after the '=' sign.&lt;/P&gt;
&lt;P&gt;- If the number after the '=' is 1, print a message with Python and then use files_move() to change it back to 0.&lt;/P&gt;
&lt;P&gt;- Repeat&lt;/P&gt;
&lt;P&gt;Sometimes, after files_move() has changed the filename back to 'printmessage=0', files_search() still thinks it is&amp;nbsp;'printmessage=1'. I have checked in Dropbox and the filename is definitely&amp;nbsp;'printmessage=0'.&lt;/P&gt;
&lt;P&gt;I'm not sure what the root of this issue could be - is there any reason why files_search() might not reflect the true contents of my Dropbox folder? Where is it getting its information from when it returns incorrect filenames?&lt;/P&gt;
&lt;P&gt;Thanks for the help &lt;img class="lia-deferred-image lia-image-emoji" src="https://www.dropboxforum.com/html/@FBF7D2AB59A0D6E861EBF6A36F93B7E2/emoticons/1f642.png" alt=":slightly_smiling_face:" title=":slightly_smiling_face:" /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 09:34:46 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Python-files-search-returns-incorrect-filenames/m-p/167289#M6063</guid>
      <dc:creator>George K.23</dc:creator>
      <dc:date>2019-05-29T09:34:46Z</dc:date>
    </item>
    <item>
      <title>Re: Python files_search() returns incorrect filenames</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Python-files-search-returns-incorrect-filenames/m-p/167290#M6064</link>
      <description>&lt;P&gt;Hi George, yes, recent changes may not immediately be reflected in search results due to a short delay in indexing. We'll get that clarified in&amp;nbsp;the documentation.&lt;/P&gt;
&lt;P&gt;For this kind of application, you may be better suited by directly checking&amp;nbsp;with &lt;A href="https://dropbox-sdk-python.readthedocs.org/en/master/moduledoc.html#dropbox.dropbox.Dropbox.files_get_metadata" target="_blank" rel="nofollow noreferrer"&gt;files_get_metadata&lt;/A&gt;&amp;nbsp;though. I.e., you can check for&amp;nbsp;'printmessage=1' or&amp;nbsp;'printmessage=0' explicitly.&lt;/P&gt;
&lt;P&gt;Or, you can use &lt;A href="https://dropbox-sdk-python.readthedocs.org/en/master/moduledoc.html#dropbox.dropbox.Dropbox.files_list_folder" target="_blank" rel="nofollow noreferrer"&gt;files_list_folder&lt;/A&gt; to list the parent folder.&lt;/P&gt;</description>
      <pubDate>Sun, 20 Mar 2016 00:46:41 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Python-files-search-returns-incorrect-filenames/m-p/167290#M6064</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2016-03-20T00:46:41Z</dc:date>
    </item>
    <item>
      <title>Re: Python files_search() returns incorrect filenames</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Python-files-search-returns-incorrect-filenames/m-p/167291#M6065</link>
      <description>&lt;P&gt;Hey, thanks for the reply. I've updated it to use files_list_folder instead, and the problem seems to have been solved &lt;img class="lia-deferred-image lia-image-emoji" src="https://www.dropboxforum.com/html/@FBF7D2AB59A0D6E861EBF6A36F93B7E2/emoticons/1f642.png" alt=":slightly_smiling_face:" title=":slightly_smiling_face:" /&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 02 Apr 2016 14:30:56 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Python-files-search-returns-incorrect-filenames/m-p/167291#M6065</guid>
      <dc:creator>George K.23</dc:creator>
      <dc:date>2016-04-02T14:30:56Z</dc:date>
    </item>
  </channel>
</rss>

