Forum Discussion

Cyrin's avatar
Cyrin
New member | Level 2
8 years ago

Select, Move, and Output a Random Image from a Folder?

Hello Dropbox developer community,
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: Is it possible to select a random image from a folder, then remember that image until it is done being used?