<?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 Select, Move, and Output a Random Image from a Folder? in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Select-Move-and-Output-a-Random-Image-from-a-Folder/m-p/262746#M15335</link>
    <description>&lt;P&gt;Hello Dropbox developer community,&lt;BR /&gt;I would like to start by saying that I'm very new to the useage of the Dropbox API (and, to be honest, Python in general). However, I am in the process of attempting to create a script for a bot for a chat service known as "Discord". My goal is to have two folders in my App's master folder: a "Queue" folder, and a "Previous" folder. My goal is to have my code select a random image from the "Queue" folder, have the Discord module upload the file to the chat rooms —aka servers— that it is in, and finally move the selected image to the "Previous" folder. So I guess what I'm asking is this:&amp;nbsp;&lt;STRONG&gt;Is it possible to select a random image from a folder, then remember that image until it is done being used?&lt;/STRONG&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 29 May 2019 09:15:47 GMT</pubDate>
    <dc:creator>Cyrin</dc:creator>
    <dc:date>2019-05-29T09:15:47Z</dc:date>
    <item>
      <title>Select, Move, and Output a Random Image from a Folder?</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Select-Move-and-Output-a-Random-Image-from-a-Folder/m-p/262746#M15335</link>
      <description>&lt;P&gt;Hello Dropbox developer community,&lt;BR /&gt;I would like to start by saying that I'm very new to the useage of the Dropbox API (and, to be honest, Python in general). However, I am in the process of attempting to create a script for a bot for a chat service known as "Discord". My goal is to have two folders in my App's master folder: a "Queue" folder, and a "Previous" folder. My goal is to have my code select a random image from the "Queue" folder, have the Discord module upload the file to the chat rooms —aka servers— that it is in, and finally move the selected image to the "Previous" folder. So I guess what I'm asking is this:&amp;nbsp;&lt;STRONG&gt;Is it possible to select a random image from a folder, then remember that image until it is done being used?&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 09:15:47 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Select-Move-and-Output-a-Random-Image-from-a-Folder/m-p/262746#M15335</guid>
      <dc:creator>Cyrin</dc:creator>
      <dc:date>2019-05-29T09:15:47Z</dc:date>
    </item>
    <item>
      <title>Re: Select, Move, and Output a Random Image from a Folder?</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Select-Move-and-Output-a-Random-Image-from-a-Folder/m-p/262805#M15342</link>
      <description>&lt;P&gt;&lt;A href="https://www.dropbox.com/developers" target="_self"&gt;The&amp;nbsp;Dropbox API&lt;/A&gt; does offer an &lt;A href="https://github.com/dropbox/dropbox-sdk-python" target="_self"&gt;official Python SDK&lt;/A&gt;&amp;nbsp;with the ability to &lt;A href="https://dropbox-sdk-python.readthedocs.io/en/latest/moduledoc.html#dropbox.dropbox.Dropbox.files_list_folder" target="_self"&gt;list&lt;/A&gt;, &lt;A href="https://dropbox-sdk-python.readthedocs.io/en/latest/moduledoc.html#dropbox.dropbox.Dropbox.files_download" target="_self"&gt;download&lt;/A&gt;, and &lt;A href="https://dropbox-sdk-python.readthedocs.io/en/latest/moduledoc.html#dropbox.dropbox.Dropbox.files_upload" target="_self"&gt;upload&lt;/A&gt;&amp;nbsp;files, among other operations, so this certainly should be possible.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For instance, you could use &lt;A href="https://dropbox-sdk-python.readthedocs.io/en/latest/moduledoc.html#dropbox.dropbox.Dropbox.files_list_folder" target="_self"&gt;files_list_folder&lt;/A&gt;&amp;nbsp;and&amp;nbsp;&lt;SPAN&gt;&lt;A href="https://dropbox-sdk-python.readthedocs.io/en/latest/moduledoc.html#dropbox.dropbox.Dropbox.files_list_folder_continue" target="_blank"&gt;files_list_folder_continue&lt;/A&gt;&amp;nbsp;to list the contents of any desired&amp;nbsp;Dropbox folder (e.g., "/Queue") and then randomly choose one of the entries in the list. You could then get the file data using &lt;A href="https://dropbox-sdk-python.readthedocs.io/en/latest/moduledoc.html#dropbox.dropbox.Dropbox.files_download" target="_blank"&gt;files_download&lt;/A&gt;, and move the file when you're done with it using &lt;A href="https://dropbox-sdk-python.readthedocs.io/en/latest/moduledoc.html#dropbox.dropbox.Dropbox.files_move" target="_self"&gt;files_move&lt;/A&gt;.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jan 2018 15:29:05 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Select-Move-and-Output-a-Random-Image-from-a-Folder/m-p/262805#M15342</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2018-01-29T15:29:05Z</dc:date>
    </item>
  </channel>
</rss>

