How exclude a given folder

What is the problem you are having with rclone?

I'm trying to exclude a folder from syncing between two loical devices (a Pc and a SD-card).
So far the code working was:

rclone sync link:/my/pc/path nolink:/my/sdcard/path/ --size-only -v  

This one is not correctly working, because the folder is not excluded

rclone sync link:/my/pc/path nolink:/my/sdcard/path/ --exclude "/my/pc/path/somefolder/**" --size-only -v  

I tried many ways (without brackets, with or without **, / and the like).
Without " the folder is excluded, but I get many error messages.

How should I do to exclude from syncing the folder /somefolder (and all its files), without getting error messages?

What is your rclone version (output from rclone version)

rclone v1.53.3

  • os/arch: linux/amd64
  • go version: go1.15.5

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

Linux KDENeon, latest release

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

local

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

as I said:  rclone sync link:/my/pc/path nolink:/my/sdcard/path/ --exclude "/my/pc/path/somefolder/**" --size-only -v 

The rclone config contents with secrets removed.

[mega]
type = mega
user = mymail
pass = mypass

[link]
type = local
links = true

[nolink]
type = local

A log from the command with the -vv flag

Paste  log here

hello and welcome to the forum,
rclone filters are relative to the root of the rclone source, not the root the the system drive.

perhaps try as a test
`rclone ls link:/my/pc/path --exclude "/somefolder/**"

Thank you: it works!

sure, glad to help the subtle doctor.

when testing filters, i use rclone ls and when that works, then try rclone sync

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