cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Are you an educator? Well we want to hear from you, so check out some tools we think might help you out 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: 

Export all files/folders on a given dropbox.com account to CSV

Export all files/folders on a given dropbox.com account to CSV

rk90
Explorer | Level 4
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.
1 Reply 1

Re: Export all files/folders on a given dropbox.com account to CSV

Greg-DB
Dropboxer

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.

Poll
We love to learn from the educators who use Dropbox. Whether you teach kids, teens, adults or a combination of all three, we want to know what apps and integrations you use with Dropbox to help with teaching. Which of the ones below is your favorite, or most used tool?
Who's talking

Top contributors to this post

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