# How to exclude from directory ?! why is exclude not working? why is it even complicated at all?!

**URL:** <https://forum.rclone.org/t/how-to-exclude-from-directory-why-is-exclude-not-working-why-is-it-even-complicated-at-all/22037>\
**Category:** Help and Support\
**Created:** [February 1, 2021, 8:27pm UTC](https://forum.rclone.org/t/how-to-exclude-from-directory-why-is-exclude-not-working-why-is-it-even-complicated-at-all/22037 "2021-02-01T20:27:17Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Daniel\_Krajnik](https://forum.rclone.org/user_avatar/forum.rclone.org/daniel_krajnik/32/7678_2.png) [@Daniel\_Krajnik](https://forum.rclone.org/u/Daniel_Krajnik)\
**Post date:** [February 1, 2021, 8:27pm UTC](https://forum.rclone.org/t/how-to-exclude-from-directory-why-is-exclude-not-working-why-is-it-even-complicated-at-all/22037/1 "2021-02-01T20:27:17Z")

</div>

rclone copy / gdrive:/backup --exclude="/proc"

this doesn't work. should it work? why not? it's a simple simple why even cmon arghh..

EDIT: the author has died out of frustration. Please reply to save posterity

---

<div class="post-metadata">

**Author:** ![asdffdsa](https://forum.rclone.org/letter_avatar_proxy/v4/letter/a/848f3c/32.png) [@asdffdsa](https://forum.rclone.org/u/asdffdsa)\
**Post date:** [February 1, 2021, 8:34pm UTC](https://forum.rclone.org/t/how-to-exclude-from-directory-why-is-exclude-not-working-why-is-it-even-complicated-at-all/22037/2 "2021-02-01T20:34:08Z")

</div>

hello,

best to test filters using `rclone ls` and debug output  
so try this command  
`rclone ls / --exclude=/proc/** -vv`

---

<div class="post-metadata">

**Author:** ![Daniel\_Krajnik](https://forum.rclone.org/user_avatar/forum.rclone.org/daniel_krajnik/32/7678_2.png) [@Daniel\_Krajnik](https://forum.rclone.org/u/Daniel_Krajnik)\
**Post date:** [February 1, 2021, 8:40pm UTC](https://forum.rclone.org/t/how-to-exclude-from-directory-why-is-exclude-not-working-why-is-it-even-complicated-at-all/22037/3 "2021-02-01T20:40:15Z")

</div>

Thanks, I found out that the syntax to exclude directories is proc/\*\* and not /proc

Do you think it makes sense to change it though? Wouldn't it be better if it worked like in rclone's namesake rsync, where directories are detected by "globally" and there is no need to add /\*\* it just automatically detects that it's a directory and not a file?

---

<div class="post-metadata">

**Author:** ![asdffdsa](https://forum.rclone.org/letter_avatar_proxy/v4/letter/a/848f3c/32.png) [@asdffdsa](https://forum.rclone.org/u/asdffdsa)\
**Post date:** [February 1, 2021, 8:44pm UTC](https://forum.rclone.org/t/how-to-exclude-from-directory-why-is-exclude-not-working-why-is-it-even-complicated-at-all/22037/4 "2021-02-01T20:44:08Z")

</div>

now that you know, no need to change it.

---

<div class="post-metadata">

**Author:** ![asdffdsa](https://forum.rclone.org/letter_avatar_proxy/v4/letter/a/848f3c/32.png) [@asdffdsa](https://forum.rclone.org/u/asdffdsa)\
**Post date:** [February 1, 2021, 8:48pm UTC](https://forum.rclone.org/t/how-to-exclude-from-directory-why-is-exclude-not-working-why-is-it-even-complicated-at-all/22037/5 "2021-02-01T20:48:13Z")

</div>

[https://rclone.org/filtering/#directories](https://rclone.org/filtering/#directories)

if you want to suggest a new feature, start a new post using the `feature` template.

---

<div class="post-metadata">

**Author:** ![Daniel\_Krajnik](https://forum.rclone.org/user_avatar/forum.rclone.org/daniel_krajnik/32/7678_2.png) [@Daniel\_Krajnik](https://forum.rclone.org/u/Daniel_Krajnik)\
**Post date:** [February 1, 2021, 9:13pm UTC](https://forum.rclone.org/t/how-to-exclude-from-directory-why-is-exclude-not-working-why-is-it-even-complicated-at-all/22037/6 "2021-02-01T21:13:43Z")

</div>

maybe you are right and it's fine. Other than that double asterisk gotcha it seems to be working fine now.

---

<div class="post-metadata">

**Author:** ![asdffdsa](https://forum.rclone.org/letter_avatar_proxy/v4/letter/a/848f3c/32.png) [@asdffdsa](https://forum.rclone.org/u/asdffdsa)\
**Post date:** [February 1, 2021, 9:15pm UTC](https://forum.rclone.org/t/how-to-exclude-from-directory-why-is-exclude-not-working-why-is-it-even-complicated-at-all/22037/7 "2021-02-01T21:15:37Z")

</div>

yeah, it is a common gotcha.

go with the flow.  
i suggest you do not rock the boat, might tip it over.  
you already died once today, 😉

---

<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:** [February 4, 2021, 9:15pm UTC](https://forum.rclone.org/t/how-to-exclude-from-directory-why-is-exclude-not-working-why-is-it-even-complicated-at-all/22037/8 "2021-02-04T21:15:39Z")

</div>

Closed on February 4, 2021, 9:15pm UTC

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