You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.
Forum Discussion
LuGas
6 years agoNew member | Level 2
Download entire folder from Dropbox using Vb. NET
Hi guys!
I'm trying to write code to create a program that will download and upload files and folders from/to Dropbox automatically.
When I need to download a single file there's no problem using X.files.downloadAsync("path", await X.GetContentAsByteArrayAsync), but when I need to download an entire folder I don't know how to do it, I can't use the same instruction...
Someone know how to solve this issue?
- Greg-DBDropbox Staff
If you want to download an entire folder using the .NET SDK, you have two options:
- Use the DownloadAsync method, calling once per file inside the folder. You can use the ListFolderAsync and ListFolderContinueAsync methods to get the file listing.
- Use the DownloadZipAsync method to download the entire folder, as long as its contents are under the documented size and file count limits. With this method, you'd then need to unzip the resulting data to access the contents. The Dropbox SDK itself doesn't offer an unzipping method, so you may need a system method or a different library to do that.
- erich_eNew member | Level 2
Silly question (RE: Option 2 "Use the DownloadZipAsync method to download the entire folder..."). To where does DownloadZipAsync(...) download the zip file??
The DownloadFileAsync() method accepts an argument containing the download target folder, but I see no such option in for the argument to DownloadZipAsync(...).
- Greg-DBDropbox Staff
erich_e As Здравко said, you can get the requested data (either individual file or zip of a folder) using the returned stream (or string, or byte array). Specifically, check out the documentation for DownloadZipAsync and for the IDownloadResponse Interface in particular for the three methods of accessing the data. There's also an example of using one of them here.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,885 PostsLatest Activity: 11 hours agoIf you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X or Facebook.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!