cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
What’s new: end-to-end encryption, Replay and Dash updates. Find out more about these updates, new features and more here.

Discuss Dropbox Developer & API

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Sorting Dropbox Folders by Most Recently Added or Updated Files Using the Dropbox API

Sorting Dropbox Folders by Most Recently Added or Updated Files Using the Dropbox API

itsmethedev
New member | Level 2

Hello, Dropbox API community!

 

I'm interested in a method to organize my Dropbox folders based on the most recently updated or added folders. Is there an API available that can assist me with this?

 

Here's what I aim to accomplish:

  1. Access a specific Dropbox folder.
  2. List the folders within that directory.
  3. Sort the folders by their most recent modification date or addition date.
  4. Retrieve the sorted list of folders.

I've successfully integrated the Dropbox API into my project, and I'm proficient in listing the folders. However, my focus is on effectively arranging these folders based on their modification or addition date.

If you could provide any code examples or API endpoints that would aid me in achieving this goal, your assistance would be highly appreciated. Thank you for your valuable support!

1 Reply 1

Greg-DB
Dropbox Staff

You can use /2/files/list_folder[/continue] to list the files and folders under any particular path, but unfortunately the Dropbox API does not return the modification or creation date for folders in particular. I'll pass this along as a feature request, but I can't promise if or when that might be implemented.

 

It does return the modification date for files though, so you could iterate through the files in a folder and take the most recent file modification date and use that as the effective modification date for the parent folder, if that works for your use case.

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
What do Dropbox user levels mean?