We’re Still Here to Help (Even Over the Holidays!) - find out more here.
Forum Discussion
prueba p.1
10 years agoNew member | Level 1
List ALL folders and files on my dropbox account
Hi, i'm working on c# and i can just show the files on the root directory , i want to show all the folders and files inside this folders on the root directory, didn't see anything on the forum, any idea?
Thx
10 Replies
Replies have been turned off for this discussion
- prueba p.110 years agoNew member | Level 1
i solved the problem, if anyone wants the code can send it
- newbie10 years agoNew member | Level 2
Hello. I'm newbie here and in c#.
Can you help me too with list folders on dropbox?
Thank you.
- Greg-DB10 years ago
Dropbox Community Moderator
To list files and folders in a linked Dropbox account using the official Dropbox .NET SDK, you should use the listFolder and listFolderContinue methods.
There are some simple examples here:
- https://github.com/dropbox/dropbox-sdk-dotnet/blob/3fa0ccc759b0c413408e3afbd08ad375f38d26d0/Examples/SimpleBlogDemo/Helpers/BlogHelpers.cs#L93
- https://github.com/dropbox/dropbox-sdk-dotnet/blob/3fa0ccc759b0c413408e3afbd08ad375f38d26d0/Examples/UniversalDemo/UniversalDemo/UniversalDemo.Shared/ViewModel/AppImageSet.cs#L82
(Note that these are simplified examples. In your actual app, you should make sure to check ListFolderResult.HasMore to see if there are more results to fetch using listFolderContinue.)
- saravananct1438 years agoExplorer | Level 3
I want code, using rest api, how can retrive all the files in dropbox folder
- Greg-DB8 years ago
Dropbox Community Moderator
- Sajidbalti6 years agoNew member | Level 2
Please send code on [email address removed by Moderators to align with our Community's Guidelines]
- ahmedcoo6 years agoNew member | Level 2
hello
i need to list all files in my dropbox in c# could u help me
thank you
- Greg-DB6 years ago
Dropbox Community Moderator
ahmedcoo For information on how to list all of the files/folders in an account using the Dropbox API in C# via the official Dropbox .NET SDK, please refer to my earlier comment here:
To list everything starting at the home folder, you'd want to use the empty string "" as the path, and set recursive to true when first calling ListFolderAsync.
- abelmor3 years agoExplorer | Level 4
Send me the code for listing files and folders in Dropbox. Louise
- Greg-DB3 years ago
Dropbox Community Moderator
abelmor Exactly how you use the API will on exactly what you're looking to do, so please refer to the information earlier in this thread to see how to configure these calls.
For example, here's a very basic sample of how you can call these methods to print out the entries for everything directly in the root folder for the call:
void HandleEntries(IList<Dropbox.Api.Files.Metadata> entries) { foreach (var entry in entries) { Console.WriteLine(entry); } } var result = await client.Files.ListFolderAsync(path:string.Empty); HandleEntries(result.Entries); while (result.HasMore) { result = await client.Files.ListFolderContinueAsync(result.Cursor); HandleEntries(result.Entries); }
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
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!