We Want to Hear From You! What Do You Want to See on the Community? Tell us here!

Forum Discussion

anonymous's avatar
anonymous
6 years ago
Solved

Issue with ListFolderAsync() ,windows form appliocation c# Dropbox api

Hello,

I'm using ListFolderAsync() to fetch all files from particular folder of DropBox.

code : var list = await dbx.Files.ListFolderAsync(folderPath, true);

So,i am getting all path of files which is inside the folder and subfolders using PathDisplay.

code : 

foreach (var item in list.Entries.Where(i => i.IsFile))
listBox1.Items.Add("Name :" + item.PathDisplay); }

But all file pathDisplay not coming in order means first few file path of main folder afterthat some subfolder file path and again main folder file paths, So how can i get filespath in order like first subfolder file paths and than main folder files paths?

  • Hi anonymous,

    :grinning: When you make a call to a native OS API, are you receiving results ordered somehow? :wink: Every application arranges the result in a target sequence or use some library to achieve this.

    Hope this helps to some extent.

2 Replies

  • Здравко's avatar
    Здравко
    Legendary | Level 20
    6 years ago

    Hi anonymous,

    :grinning: When you make a call to a native OS API, are you receiving results ordered somehow? :wink: Every application arranges the result in a target sequence or use some library to achieve this.

    Hope this helps to some extent.

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    6 years ago

    Anonymous The Dropbox API doesn't guarantee a particular ordering of folder list results, but I'll pass this along as a feature request. I can't promise if or when that might be implemented though.

    Like Здравко said, you can apply whatever ordering you want in your application code.

About Discuss Dropbox Developer & API

Node avatar for Discuss Dropbox Developer & API
Make connections with other developers814 PostsLatest Activity: 4 hours ago
274 Following

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 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!