Rclone Search folder using keyword

i using windows os, rclone version 1.58.1 and host is google drive. i want to find all the folder and subfolder based on keyword. following command line works, but it including all the file list as well. i tried to add --dirs-only flag but rclone throw error

rclone ls --include "*test*" "remote:path"

This should do what you want

rclone lsf -R --files-only --include "*test*" "remote:path"

thank you but i want to search folder only.

Use --dirs-only instead of --files-only

i tried --dirs-only before. but if i use --dirs-only flag, it does not check the keyword and list all the folder and. however --files-only flag is working fine for files only.

can you post a debug log?

I don't think rclone can do this actually. The filters only work on files, so if you want to find all files which are in those directories you can do

rclone lsf -R --files-only --include "**/*test*/*" "remote:path"

You could then use a little shell scripting to turn that into all the directories.

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