Can't succeed in making --exclude work

Hi there!

I’m having a hard time making rclone sync files to my Google Drive with an --exclude flag.

I have this folder .foobar that i want to exclude with all its files and subdirectories.
I launched rclone sync /my/dir remote:/my/remote/dir --exclude ".foobar/**, but it keeps copying all in .foobar to Drive. I tried adding a slash before the make (sorry I’m n00b), with no success.
I also tried giving the flag --exclude-from "file" instead, where file’s content was -. foobar/** or - /.foobar/**, but nothing changed under both circmustances.

Can you help me understand what I should do to achieve my purpose?

I’m running rclone 1.35 on Xubuntu Xenial.

Posted the exact same thing 10 days ago, have a look for correct syntax:

This should be the correct syntax provided the path to .foobar is /my/dir/.foobar

rclone sync /my/dir remote:/my/remote/dir --exclude "/.foobar/**"

Test using rclone ls

rclone ls /my/dir  --exclude "/.foobar/**"


$ rclone ls .
        5 one
        0 .potato/two
$ rclone ls . --exclude "/.potato/**"
        5 one