How do I search a remote for a directory? When I don't know which directory it's in?

rclone lsd --include "*rofile/" -v --fast-list "cachecrypt:D:\Users"

will return any profile folders in the directory D:\Users
I like to use *rofile because it finds both profile and Profile.

HOWEVER I can't figure out how to find all my profile folders with this command:

rclone lsd --include "*rofile/" -v --fast-list "cachecrypt:"

what happens is I get 0 results

Then I try:

rclone lsd -R --include "*rofile/" -v --fast-list "cachecrypt:"

what happens is I get 0 results

Then I try:

rclone lsd -R --include "*/rofile/" -v --fast-list "cachecrypt:"

what happens is I get 0 results

Then I try:

rclone lsd --include "**rofile/" -v --fast-list "cachecrypt:"

and I get the same results as:

rclone lsd -v --fast-list "cachecrypt:"

Then I try:

rclone lsd --include "**/*rofile/" -v --fast-list "cachecrypt:"

and I get the same results as:

rclone lsd -v --fast-list "cachecrypt:"

Then I try:

rclone lsd -R --filter "+ **rofile/" --filter "- **/" -v --fast-list "cachecrypt:"

and the results are every single folder on the entire remote...

so, uh, what specifically is the command for finding a specific directory, when I know the name of the directory, and that it exists on my remote, but I have no idea which subdirectories it's hidden in?

edit:

oh also this returns no results at all:

rclone lsd -R --filter "+ *rofile/" --filter "- **/" -v --fast-list "cachecrypt:"

rclone finds files and not directories. That being said if there are files in them, this will work. It won't match empty directories with filters.

https://rclone.org/filtering/#directories

rclone lsl --include=**/{[Pp]}rofile/**  test
        0 2020-06-10 19:11:02.395376023 users/rob/Profile/file
        0 2020-06-10 19:11:11.579336934 users/jon/profile/file
root@s163042:~# rclone tree test
/
└── users
    ├── jon
    │   └── profile
    │       └── file
    └── rob
        └── Profile
            └── file

5 directories, 2 files

you need two stars to descend into subdirectories.

Okay so rclone lsl --include "**/profile/**" "cachecrypt:" worked!~

Then I tried

rclone lsl --include "**/*rofile*/**" "cachecrypt:"

And it also worked! hooray! I get it now! lsl is just BETTER than lsd!

That said, if rclone finds files not directories then what is the point in making the lsd command work with the -R flag?

It's the filtering that doesn't match directories except for using them to optimize the path to them. So when you're using lsd it can't match the files since it's only listing directories.

The point of the -R command is to recursively list directories.

And you can use the {[Pp]} to match lower and upper like in my example

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