How to view the specific files or folder names that are excluded

What is the problem you are having with rclone?

I would like to know, how to view the specific files or folder names that are excluded in the log. Is there any configuration that can achieve this? I have tried the -vv flag, but it only logs files that are not excluded.

file list of "test-folder"

f1.accdb
f2.accdb
f3.DM
f4.DM

If I use the --exclude=*.DM rule, the log will not display files ending with .DM

Run the command 'rclone version' and share the full output of the command.

v1.65.0

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

Local Filesystem

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

rclone copy -vv D:\temp\test-folder local-test:D:\temp\rclone-storage --exclude=*.DM

Please run 'rclone config redacted' and share the full output. If you get command not found, please make sure to update rclone.

[local-test]
type = local

A log from the command that you were trying to run with the -vv flag

2023/12/12 14:40:56 DEBUG : rclone: Version "v1.65.0" starting with parameters ["D:\\ProgramTools\\bin_program\\rclone.exe" "copy" "-vv" "D:\\temp\\test-folder" "local-test:D:\\temp\\rclone-storage" "--exclude=*.DM"]
2023/12/12 14:40:56 DEBUG : Creating backend with remote "D:\\temp\\test-folder"
2023/12/12 14:40:56 DEBUG : Using config file from "C:\\Users\\bol\\AppData\\Roaming\\rclone\\rclone.conf"
2023/12/12 14:40:56 DEBUG : fs cache: renaming cache item "D:\\temp\\test-folder" to be canonical "//?/D:/temp/test-folder"
2023/12/12 14:40:56 DEBUG : Creating backend with remote "local-test:D:\\temp\\rclone-storage"
2023/12/12 14:40:56 DEBUG : fs cache: renaming cache item "local-test:D:\\temp\\rclone-storage" to be canonical "local-test://?/D:/temp/rclone-storage"
2023/12/12 14:40:56 DEBUG : f1.accdb: Need to transfer - File not found at Destination
2023/12/12 14:40:56 DEBUG : f2.accdb: Need to transfer - File not found at Destination
2023/12/12 14:40:56 DEBUG : Local file system at //?/D:/temp/rclone-storage: Waiting for checks to finish
2023/12/12 14:40:56 DEBUG : Local file system at //?/D:/temp/rclone-storage: Waiting for transfers to finish
2023/12/12 14:40:56 DEBUG : f2.accdb: md5 = 72281a3ccfe9a801b65720a628b4b87d OK
2023/12/12 14:40:56 DEBUG : f1.accdb: md5 = 31ffd7d8754577ced56a15ce5b1951a0 OK
2023/12/12 14:40:56 DEBUG : f2.accdb.fevozoz4.partial: renamed to: f2.accdb
2023/12/12 14:40:56 INFO  : f2.accdb: Copied (new)
2023/12/12 14:40:56 DEBUG : f1.accdb.jefexeb4.partial: renamed to: f1.accdb
2023/12/12 14:40:56 INFO  : f1.accdb: Copied (new)
2023/12/12 14:40:56 INFO  :
Transferred:       10.094 MiB / 10.094 MiB, 100%, 0 B/s, ETA -
Transferred:            2 / 2, 100%
Elapsed time:         0.0s

2023/12/12 14:40:56 DEBUG : 5 go routines active

AFAIK you can not.

welcome to the forum,

if you want a list of files that match a filter, then use --include

rclone lsf D:\temp\rclone-storage --include=*.DM
f3.DM
f4.DM

Thank you for your reply, but what I want to know is how to see the excluded files in the log of the copy command. There seems to be no way to do that now.

I have seen a specific log of excluded files in this post, which may be due to different commands or storage. I will try it.

@ncw Hello, I debugged the v1.65.0 code for the problems described in this post.

In the implementation of "the local filesystem", lines 576 to 578 of the backend/local/local.go file (belonging to the List function) are as follows:

if useFilter && !filter.IncludeRemote(newRemote) {
    continue
}

Because filter is called and the log is not printed, there is no log of the excluded file when the filterAndSortDir function in fs/list/list.go is executed.

if !includeAll && !IncludeObject(ctx, x) {
    ok = false
    fs.Debugf(x, "Excluded")
}

In other cloud storage system, there are logs of excluded files.

So for "the local filesystem", is this a feature or bug? Look forward to your reply.

Very good investigation.

I was always testing using local fs and never realised that other remotes might behave differently.

I think this is the omission and should not be difficult to rectify.

Is it something you want to give a go?

ok, i will try.

1 Like

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