Filtering using multiple globs

What is the problem you are having with rclone?

I'm trying to filter a specific kind of subdirectory using a filter that contains multiple globs, but it's not working.
For example, I wanted to filter all the environment folders from my projects:

├── python
│   ├── foobar
│   │   └── .venv
│   └── some_arbitrary_name
│       └── .venv
└── web
    └── random_project
        └── node_modules

Can I filter those folders with --exclude '/python/*/.venv/**' --exclude '/web/*/node_modules/**'?

Because it's simply not working for me (it still copies those folders).

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

rclone v1.61.1
- os/version: Microsoft Windows 10 Enterprise 22H2 (64 bit)
- os/kernel: 10.0.19045.2604 (x86_64)
- os/type: windows
- os/arch: amd64
- go/version: go1.19.4
- go/linking: static
- go/tags: cmount

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


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

rclone copy -P ./projects d:/projects --exclude='/python/*/.venv/**' --exclude='/web/*/node_modules/**'

The rclone config contents with secrets removed.

I'm not using any configuration files.

A log from the command with the -vv flag

I'm sorry, but is this one really necessary? The reason I'm asking this question is because the copying process is taking so long that I simply don't have the time to wait for it to complete. I simply can't provide the logs because the command can't complete within a reasonable timeframe.

Alright, it seems that the problem is caused by the MSYS2 shell. MSYS2 is known to magically interpolate certain arguments that looks like paths that starts with a slash (/tmp -> C:/msys64/tmp) and that probably what caused it to fail.

For what it's worth, I did try to check this by echo-ing the filter to see if it MSYS2 mangles it, but I guess MSYS2 magically doesn't interpolate paths when echo-ing them.


MSYS2 seems like an evolution of the cygwin shell which I always found had just a bit too much magic.

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