2025 sparked some incredible conversations across our community 👩💻. Discover the highlights and see what’s ahead in 2026.
Forum Discussion
TS L.
5 years agoExplorer | Level 4
TaskListFolderAndAccountId does not list all files in the folder
My app is using TaskListFolderAndAccountId to get the list of files and folders from the root directory. It was working fine and list all the files and folders in the root directory without any probl...
- 5 years ago
Thanks! We'll look into it and follow up with you there.
Greg-DB
Dropbox Community Moderator
5 years agoListing a folder (such as root) can take an arbitrary number of calls, so make sure you're aggregating the results from all of the calls.
It's not entirely clear where/when are you actually collecting these result sets. It seems like some of the relevant code may be missing here, but looking at the code you shared, it looks like you may only be collecting the last page, since you're doing folderNameArray.clear() each time.
TS L.
5 years agoExplorer | Level 4
The root direcotry complete folders and files are from my Dropbox root folder. Set A and B are getting from the code Log.i("dbFolderName", "dbFolderName: $dbFolderName") when iterating in
for (i in files.indices) loop.
I tested again by removing the line folderNameArray.clear(). It gave the same results of A and B as before.
Note: I added the line folderNameArray.clear() is to have a clean set before iterating the result.entries with the for(i in files.indices) loop.
- Greg-DB5 years ago
Dropbox Community Moderator
Thanks for the information. It's unclear from this what the issue is then. Could you open an API ticket so we can take a closer look? Please include the full responses that you're getting, without any processing. That is, show what you're getting back in all of the ListFolderResult objects from all of the calls to listFolder and listFolderContinue without any extra handling so we can see the results and cursors. Thanks!
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
If 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, Facebook or Instagram.
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!