# How to exclude all directories with the name .sync?

**URL:** https://forum.duplicati.com/t/how-to-exclude-all-directories-with-the-name-sync/9414
**Category:** How-To
**Created:** [March 14, 2020, 5:27pm UTC](https://forum.duplicati.com/t/how-to-exclude-all-directories-with-the-name-sync/9414 "2020-03-14T17:27:10Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![slowmail](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/s/5f9b8f/32.png) [@slowmail](https://forum.duplicati.com/u/slowmail)
#### Post date: [March 14, 2020, 5:27pm UTC](https://forum.duplicati.com/t/how-to-exclude-all-directories-with-the-name-sync/9414/1 "2020-03-14T17:27:10Z")

</div>

I’m just getting started with Duplicati on a Windows PC, and can’t seem to figure this out.

In my source, there are some directories with the name “.sync” (without quotes) that I would like to exclude.

In the GUI, I tried `"Exclude folder .sync"`, but it didn’t work.  
I also tried `"Exclude directories whose names contain .sync"`, but that didn’t work either.

Can anyone advise what I am missing here?

(They show up as the following when I edit as list)  
-.sync\  
-_.sync_\

Thanks.

---

<div class="post-metadata">

### Author: ![Bobo](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/b/f9ae1b/32.png) [@Bobo](https://forum.duplicati.com/u/Bobo)
#### Post date: [March 14, 2020, 6:28pm UTC](https://forum.duplicati.com/t/how-to-exclude-all-directories-with-the-name-sync/9414/2 "2020-03-14T18:28:08Z")

</div>

–exclude=“.sync\\”

> [@Exclude option not working](https://forum.duplicati.com/t/exclude-option-not-working/6309/3):
>
> Ok given your hints, including the [entire filters discussion in the manual](https://duplicati.readthedocs.io/en/latest/appendix-d-filters/), I tried using the GUI to “Exclude directories whose names contain” and I specified “temp”. Ie: [image] Selecting “Edit as text” (the 3 dots menu upper right) for that gives (note the BACKslash): [image] Then I exported command line and got (note, again, the BACKslash): --exclude="\*temp\*\\" So, I think you’ve hit the nail (both nails) on the head. Use backslash for windows To match dirs, must end with slash (backs…

---

<div class="post-metadata">

### Author: ![slowmail](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/s/5f9b8f/32.png) [@slowmail](https://forum.duplicati.com/u/slowmail)
#### Post date: [March 14, 2020, 10:57pm UTC](https://forum.duplicati.com/t/how-to-exclude-all-directories-with-the-name-sync/9414/3 "2020-03-14T22:57:39Z")

</div>

Thanks for the reply. I was finally able to figure out the correct config for what I wanted to do:

```
"Exclude expression *\.sync\" 
or "-*\.sync\" with 'edit as list')
```
