You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.
Forum Discussion
abhannan
7 years agoHelpful | Level 5
Dropbox equivalent of os.walk() for python
Hi,
I'm looking to list all the files in folders and sub-folders of one dropbox account with Python v2 API. Is there any equivalent of os.walk() in the API? I can see that we have files_list_folder() but this does not list the files in sub-folders.
Also is there any function in the API which provides the file types, for example, .mp3 or .jpg. If not then I have to do python magic to extract this information.
Thanks
If you need to list all entries, included nested files and folders, you should use files_list_folder and files_list_folder_continue. You can do so by setting recursive=True on the initial call to files_list_folder.
The Dropbox API doesn't offer a way to automatically retrieve the file extension, so you should extract that from the name or path.
- Greg-DBDropbox Staff
If you need to list all entries, included nested files and folders, you should use files_list_folder and files_list_folder_continue. You can do so by setting recursive=True on the initial call to files_list_folder.
The Dropbox API doesn't offer a way to automatically retrieve the file extension, so you should extract that from the name or path.
- steve-the-bayesNew member | Level 2
Links to docs are either broken or were never populated. They lead to:
\ SORRY / \ / \ This page does / ] not exist yet. [ ,'| ] [ / | ]___ ___[ ,' | ] ]\ /[ [ |: | ] ] \ / [ [ |: | ] ] ] [ [ [ |: | ] ] ]__ __[ [ [ |: | ] ] ] ]\ _ /[ [ [ [ |: | ] ] ] ] (#) [ [ [ [ :====' ] ] ]_].nHn.[_[ [ [ ] ] ] HHHHH. [ [ [ ] ] / `HH("N \ [ [ ]__]/ HHH " \[__[ ] NNN [ ] N/" [ ] N H [ / N \ / q, \ / \
- Greg-DBDropbox Staff
steve-the-bayes Thanks for letting me know! I've fixed the documentation links in my earlier message.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,910 PostsLatest Activity: 2 days agoIf 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!