# Certain exclusion flags seem to be ignored

**URL:** <https://forum.rclone.org/t/certain-exclusion-flags-seem-to-be-ignored/20049>\
**Category:** Help and Support\
**Created:** [October 28, 2020, 12:25am UTC](https://forum.rclone.org/t/certain-exclusion-flags-seem-to-be-ignored/20049 "2020-10-28T00:25:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kangfat](https://forum.rclone.org/letter_avatar_proxy/v4/letter/k/f07891/32.png) [@kangfat](https://forum.rclone.org/u/kangfat)\
**Post date:** [October 28, 2020, 12:25am UTC](https://forum.rclone.org/t/certain-exclusion-flags-seem-to-be-ignored/20049/1 "2020-10-28T00:25:43Z")

</div>

#### What is the problem you are having with rclone?

Certain exclusion flags are being ignored. This flag seems to be ignored:

```auto
-exclude "[{JP,KR,HK,CN,RU,PL,AU,GB,FR}]"

```

#### What is your rclone version (output from `rclone version`)

```auto
rclone v1.53.1
- os/arch: linux/amd64
- go version: go1.15

```

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

Ubuntu 16.04.7 LTS

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

Google Drive

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

```auto
rclone sync stash: romdrive:Switch --transfers 10 --exclude "[{JP,KR,HK,CN,RU,PL,AU,GB,FR}]" --exclude NSZ/dlc/language-packs/ **--exclude NSZ/updates/duplicates/** --exclude NSP/ **--exclude Extras/** --exclude XCI/ **--exclude CXCI/** --exclude NSZ/demos/** --drive-stop-on-upload-limit --checksum --log-level INFO --log-file /home/plex/logs/sync/stash/stash-${datestr}-sync.txt

```

#### The rclone config contents with secrets removed.

```auto
[romdrive]
type = drive
client_id = 
client_secret = 
scope = drive
token = 

[stash]
type = drive
client_id = 
client_secret = 
scope = drive
token = 
team_drive = 
root_folder_id = 

```

#### A log from the command with the `-vv` flag

I had to cut this down as my original file was way too big for pastebin. If the full log is needed I will have to figure out another way to send it.

> **[Stash-Exclusion - Pastebin.com](https://pastebin.com/VwmgUpfE)**
>
> Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.

---

<div class="post-metadata">

**Author:** ![ncw](https://forum.rclone.org/user_avatar/forum.rclone.org/ncw/32/18_2.png) [@ncw](https://forum.rclone.org/u/ncw)\
**Post date:** [October 28, 2020, 11:31am UTC](https://forum.rclone.org/t/certain-exclusion-flags-seem-to-be-ignored/20049/2 "2020-10-28T11:31:20Z")

</div>

> [@kangfat](#):
>
> Certain exclusion flags are being ignored. This flag seems to be ignored:
> 
> ```auto
> -exclude "[{JP,KR,HK,CN,RU,PL,AU,GB,FR}]"
> 
> ```

Note that `[` and `]` mean something in the filter glob language, so you need to escape them.

I suspect you meant this - note the `\` to escape the `]` and the single quotes so your shell doesn't interpret the `\` and the leading and trailing `*` to match this anywhere in the string.

```
--exclude '*\[{JP,KR,HK,CN,RU,PL,AU,GB,FR}\]*'

```

---

<div class="post-metadata">

**Author:** ![kangfat](https://forum.rclone.org/letter_avatar_proxy/v4/letter/k/f07891/32.png) [@kangfat](https://forum.rclone.org/u/kangfat)\
**Post date:** [October 28, 2020, 1:46pm UTC](https://forum.rclone.org/t/certain-exclusion-flags-seem-to-be-ignored/20049/3 "2020-10-28T13:46:22Z")

</div>

That's what I was missing. Thank you!

---

<div class="post-metadata">

**Author:** ![system](https://forum.rclone.org/uploads/default/original/2X/3/39ad3235f6ffec76ccd0c81616bd55697b4c300d.png) [@system](https://forum.rclone.org/u/system)\
**Post date:** [December 28, 2020, 9:46am UTC](https://forum.rclone.org/t/certain-exclusion-flags-seem-to-be-ignored/20049/4 "2020-12-28T09:46:23Z")

</div>

Closed on December 28, 2020, 9:46am UTC

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