cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Tell us what you want to see on the Community here!
Close

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

Highlighted

How to ignore folders during recursive listing

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
Highlighted

Re: How to ignore folders during recursive listing

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.)

Work Smarter with Dropbox

The way we work is changing. Share and discover new ways to work smarter with Dropbox in our community.

Sound good? Let's get started.
Who's talking

Top contributors to this post

What do Dropbox user levels mean?
Need more support?