cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Get summer ready with Dropbox basic - travel documents, plans, progress reminders and more, right over here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to ignore folders during recursive listing

How to ignore folders during recursive listing

rk90
Explorer | Level 4

When I operate on a Dropbox Business account and list each member's personal folders, I end up listing the same shared folders multiple times. That is, if a shared folder is mounted within each member's personal folders, then when I list members' folders I end up listing that shared folder also.

I can filter out the listed shared folder if I don't use  'recursive=True', that is, I can iterate over each sub-folder and check if it's a shared folder and whether or not it was listed before, but then the disadavtage is I will have to recure through each folder manually. How can I list folders recursively and ignore certain sub-folders from getting listed on subsequent `list_folder/continue`.

 

 

1 Reply 1

Re: How to ignore folders during recursive listing

Greg-DB
Dropboxer

There isn't a way to ask the API to ignore specific folders, but it sounds like this question is similar to this previous one of yours. As there, the closest thing is the 'include_mounted_folders' option on /2/files/list_folder. (You set the option when calling /2/files/list_folder, and the behavior will follow through to /2/files/list_folder/continue based on the resulting cursors.)

Otherwise, you'd need to filter out the entries client-side, based on sharing_info.parent_shared_folder_id or sharing_info.shared_folder_id values that you've seen before. (The shared folder IDs are consistent across users.)

Poll
Which Dropbox Plan do you have?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropboxer
What do Dropbox user levels mean?
Need more support?