We Want to Hear From You! What Do You Want to See on the Community? Tell us here!
Forum Discussion
rk90
7 years agoHelpful | Level 5
Export all files/folders on a given dropbox.com account to CSV
I am working on a CLI app that will use a team admin token to export the entire data structure (including team folders, shared folders and members' personal folders) on a given dropbox.com account.
I am using Python SDK and getting duplicated entries. That is, when I list team folders, I get the list of all team folders, then I list each member's root folders and I get their personal folders along with shared folders and team folders that were listed previously when I first listed the team folders.
How would I get a unique listing of files/folders? I've read about user's root and team space but I wouldn't know whether team is sharing a team space.
I am using Python SDK and getting duplicated entries. That is, when I list team folders, I get the list of all team folders, then I list each member's root folders and I get their personal folders along with shared folders and team folders that were listed previously when I first listed the team folders.
How would I get a unique listing of files/folders? I've read about user's root and team space but I wouldn't know whether team is sharing a team space.
1 Reply
- Greg-DB7 years ago
Dropbox Community Moderator
To de-duplicate these entries, you should use the namespace ID for each shared/team folder. I.e., the "shared folder ID" or "team folder ID". These IDs will be consistent across user accounts, even if the path of the folder is not.
You can determine if a user is on a team that uses the "team space" by checking the FullAccount.root_info returned by users_get_current_account. You can check if the type of the RootInfo is a TeamRootInfo or a UserRootInfo. Check out those links for more information on that.
I also recommend reviewing the Namespace Guide and Content Access Guide for more information, if you haven't already.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.6,035 PostsLatest Activity: 2 years ago
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 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!