Copying newest n files from remote

Is there any way to filter "newest n files from remote"? Can't use --*-age filters because I don't know beforehand when the newest file is actually changed.

rclone v1.45
- os/arch: linux/386 (CentOS 6)
- go version: go1.11.2
- remote: Google Drive


Ancient version of rclone so you'd want to upgrade that.

You can use filters on anything so a local source or a remote. If it's on a remote, if has to support modtime to get the age so there are some caveats. On google drive, you'd be fine though.


You could probably use rclone lsf... How about this to find the 10 newest files on remote:

rclone lsf -R -F tp --files-only remote: | sort -r | head -n 10 | cut -d ';' -f2-

Once you've found them, put them in a file and use rclone copy --files-from file remote: /local

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