How to recursion search by filter under subfolder?

What is the problem you are having with rclone?

I want to confirm whether there are certain files in some folders。
like windows explorer search:

I have read the doc.(like filter or list),unable to solve

What is your rclone version (output from rclone version)

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

windows 10 64 bit and ubuntu 64 bit

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

Local and sftp

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

Paste command here

The rclone config contents with secrets removed.

Paste config here

A log from the command with the -vv flag

Paste  log here

I think your filter rule should not have Opt in it,so

"_filter": {
    "IncludeRule": "*.csv",
    "IgnoreCase": true

sorry, a stupid mistake。
without Opt result is the same。
the postman testcase means,get list result depends on the filter match。
but current version,result is same。filter useless。
the csv file is in sub sub folder,not in the current folder。

Seems to be working for me. Are you using the latest beta?

$ tree .
├── file.csv
└── file.txt
$ rclone rc --loopback operations/list  fs=. remote= _filter='{"IncludeRule":["*.csv"], "IgnoreCase":true}'
	"list": [
			"IsDir": false,
			"MimeType": "text/csv; charset=utf-8",
			"ModTime": "2021-02-26T13:49:09.181683459Z",
			"Name": "file.csv",
			"Path": "file.csv",
			"Size": 0
$ rclone rc --loopback operations/list  fs=. remote= _filter='{"IncludeRule":["*.txt"], "IgnoreCase":true}'
	"list": [
			"IsDir": false,
			"MimeType": "text/plain; charset=utf-8",
			"ModTime": "2021-02-26T13:49:04.973654373Z",
			"Name": "file.txt",
			"Path": "file.txt",
			"Size": 0

There is a misunderstanding。
my tree is


csv in Metrics folder but my search fs =G:/111222/ Logs ,remote=""

My purpose is like ubuntu “Find” command


You'll need to set the Recursive flag in operations/list if you want that, so try

rclone rc --loopback operations/list  fs=. remote= _filter='{"IncludeRule":["*.csv"], "IgnoreCase":true}' opt='{"recurse": true}'

perfect,opt solve my problem

1 Like

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