Top entries and order by

What is the problem you are having with rclone?

Getting only top 10 entries from a folder with 10000s of objects in OneDrive

What is your rclone version (output from rclone version)

rclone v1.50.2

Which OS you are using and how many bits (eg Windows 7, 64 bit)

  • os/arch: linux/amd64

Which cloud storage system are you using? (eg Google Drive)

OneDrive

The command you were trying to run (eg rclone copy /tmp remote:tmp)

NA

The rclone config contents with secrets removed.

NA

A log from the command with the -vv flag

NA

Is this possible currently or can we have this as a feature request?

hello and welcome to the forum,

you need to update to latest stable and test again.
https://rclone.org/install/#script-installation

What defines the top 10 ? The first 10 returned?

It depends on whatever is the listing order. If we were to order by last modified, it would be top according to time for example. I see that currently there is no way to order directory listing. If there were a feature to sort then top ten would be great.

It solves the scenario of getting the most recent files or the oldest files. Without this we have to wait for minutes while all the files are enumerated.

How do you know how the list is sorted unless you get the full directory listing?

OneDrive doesn't support --fast-list unfortunately so not sure how effective it is as you can always get the listing and sort it via json.

There isn't a way to get the top x results if the provider doesn't support that via their API.

I'm definitely not familiar with the OneDrive API as I use Google, but I don't see it here:

https://docs.microsoft.com/en-us/onedrive/developer/rest-api/api/driveitem_list_children?view=odsp-graph-online

I might be missing something though so if you see an API way to do it, a feature request can always be added.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.