Your workflow is unique 👨💻 - tell us how you use Dropbox here.
Forum Discussion
master98ofu
9 years agoExplorer | Level 3
Is there a call to see files in a Dropbox with the Core Python API?
I think the subject asks the question well, "Is there a call to see files in a Dropbox with the Core Python API?"
I haven't looked over the actual client.py file, just wondering.
3 Replies
- Greg-DB9 years ago
Dropbox Community Moderator
Yes, you can use files_list_folder and files_list_folder_continue to list the files and folders in the connected Dropbox account.
- master98ofu9 years agoExplorer | Level 3@bot.command(pass_context=True)
async def test2(ctx):
l = dropbox.files.files_list_folder('/Apps')
await bot.say(l)
The first two and the bottom lines are for another program, but apparently, running this gives me a error saying:
Ignoring exception in command test2
Traceback (most recent call last):
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35-32\lib\sit
e-packages\discord\ext\commands\core.py", line 50, in wrapped
ret = yield from coro(*args, **kwargs)
File "bot.py", line 51, in test2
l = dropbox.files.files_list_folder('/Apps')
AttributeError: module 'dropbox.files' has no attribute 'files_list_folder'
Where is files_list_folder? - Greg-DB9 years ago
Dropbox Community Moderator
Assuming "dropbox" is your Dropbox client instance, it would just be "dropbox.files_list_folder" (Without the extra ".files".)
There's an example here:
https://github.com/dropbox/dropbox-sdk-python/blob/master/example/updown.py#L138
You probably shouldn't name your client object "dropbox" though, since that's the name of the module you import.
About Dropbox API Support and Feedback
Get help with the Dropbox API from fellow developers and experts.
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, Facebook or Instagram.
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!