We’re Still Here to Help (Even Over the Holidays!) - find out more here.
Forum Discussion
gbc04
3 years agoExplorer | Level 3
Folder searches using the API often fail.
I created a function to download data files at the desired time by searching folders by date in a program (C#) through App Key (OAuth 2) and used it for several years. However, from 09-12 to the 12t...
gbc04
3 years agoExplorer | Level 3
* SDK information is [Official Dropbox .Net v2 SDK v5.0.7591]
* Source Code
using (var dbx = new DropboxClient(Program.ConfigIni.BaseInfo.DropBoxApiTokenKey))
{
string DownForderName = "/" + Program.ConfigIni.BaseInfo.ServerOpenPath;
var aData = await dbx.Files.ListFolderAsync(DownForderName);
//When loading here, only part of the folder information is displayed, but all is displayed in the dropbox program.
var list = aData.Entries.OrderBy(x => x.Name).ToArray();
//show folders then files
foreach (var item in list.Where(i => i.IsFolder))
{
IsActivce = true;
string FileFullPath = "";
FileFullPath = item.Name;
var ForderInFiles = await dbx.Files.ListFolderAsync(DownForderName + "/" + item.Name);
foreach (var Files in ForderInFiles.Entries.Where(i => i.IsFile))
{
~~~
}
}
}
Greg-DB
Dropbox Community Moderator
3 years agogbc04 Здравко is correct; you need to implement both ListFolderAsync and ListFolderContinueAsync. You aren't guaranteed to get all results back in just one call to ListFolderAsync. Please refer to the documentation linked there for information on how to use this.
About Discuss Dropbox Developer & API
Make connections with 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!