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
qazimuneeb1
5 years agoExplorer | Level 3
get list of folders
Hi. I want to get a list of folders along with path inside my dropbox so that i can upload my files to defined path through my own made android application. Is there any way to get folders list without clicking each folder and get path? I mean get list of folders along with path when i initiate DbxClientV2? or any other way so i can select path from my app when uploading file to specific path?
Yes, using the Dropbox Java SDK, you can get the list of files/folders under any particular path using the listFolder/listFolderContinue methods. The result will contain a list of Metadata objects, from which you can get the paths for the referenced items. There's an example of calling listFolder here. As shown there, to list the root folder itself, you would supply a path value of the empty string "".
- Greg-DBDropbox Staff
Yes, using the Dropbox Java SDK, you can get the list of files/folders under any particular path using the listFolder/listFolderContinue methods. The result will contain a list of Metadata objects, from which you can get the paths for the referenced items. There's an example of calling listFolder here. As shown there, to list the root folder itself, you would supply a path value of the empty string "".
- qazimuneeb1Explorer | Level 3
and what about the nested folders? Do we get them also?
- Greg-DBDropbox Staff
You can use listFolderBuilder to get a ListFolderBuilder you can use and call withRecursive(true) to do a recursive listing if you wish. That would include nested items.
Or, to just list the contents of particular nested folder when needed, you can use listFolder/listFolderContinue again with the path of the folder you want to list.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,915 PostsLatest Activity: 4 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!