I would like to list only the files matching a particular pattern.
I have tried the following commands:
rclone lsf -R --include "**2160p**.mkv" "GDrive:Media/TV Shows/" - This list includes the directories containing the files
rclone ls --include "**2160p**.mkv" "GDrive:Media/TV Shows/" - This list has only the files but is not machine readable (i.e. has the size too).
I could make do with the second command and remove the sizes using bash, but, was wondering if there is a cleaner way to achieve the same?
--files-only flag to
Such a simple solution. I must have missed this flag in the docs somehow.
Also, is there any way to specify whether the search is case-sensitive or case-insensitive?
No, and there really should be.
There is an issue about this: https://github.com/ncw/rclone/issues/502
I think the only reason it hasn’t got implemented is that we’ve failed to think of a good syntax!
I could easily make a flag to make all globs (the pattern that filters use) case insensitive.
But what if you wanted them on a case by case basis…
Any suggestions appreciated!
I think you should go ahead and implement the global flag for now. Those who want both can simply run the filter twice, once with and once without and then combine the results.
No need to pause on the implementation of a working solution just to get to a perfect solution.
I’ve implemented the
--ignore-case flag here:
https://beta.rclone.org/branch/v1.44-080-g16f797a7-ignore-case-beta/ (uploaded in 15-30 mins)
--ignore-case is now in the latest beta (or will be in 15-30 mins when the build is finished!)
Thanks for this. Will try it out later today.