Search code examples
python-2.7dropbox

Python 2.7 - Dropbox API V2. Download whole folder


I have an App Folder in my dropbox, and in that folder, let's say there is a folder called 'database'. How would I go about downloading the whole folder's contents and putting it into a folder, or reading each files contents one-by-one? (The latter is preferable as I assume that would use the least amount of processing power)

Thank you!

To sum up: I need to get a whole folder's file contents, and save them locally.


Solution

  • I've found an answer, though it doesn't use the Dropbox API, it uses URLLIB.

    URL = "dropbox folder link"
    globalData = urllib.urlretrieve(URL, "file-destination")
    

    Simple :)