# Folder and files not deleted, even with (?d) ignore patterns (solved)

**URL:** https://forum.syncthing.net/t/folder-and-files-not-deleted-even-with-d-ignore-patterns-solved/18262
**Category:** Support
**Created:** [April 3, 2022, 5:26pm UTC](https://forum.syncthing.net/t/folder-and-files-not-deleted-even-with-d-ignore-patterns-solved/18262 "2022-04-03T17:26:47Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Thilo](https://forum.syncthing.net/user_avatar/forum.syncthing.net/thilo/32/10089_2.png) [@Thilo](https://forum.syncthing.net/u/Thilo)
#### Post date: [April 3, 2022, 5:26pm UTC](https://forum.syncthing.net/t/folder-and-files-not-deleted-even-with-d-ignore-patterns-solved/18262/1 "2022-04-03T17:26:47Z")

</div>

Got a folder that is not deleted.

Folder did not get deleted because there were ignored files within the folder that were not deleted

Files within the folder that were not deleted are named:

- `bibliography.bib.bak`
- `bibliography.bib.sav.tmp`

**What I did:**

1. Had folder and files in synchronized state
2. Had SyncTrayzor on local device GTMM2P `OFF`
3. Had Syncthing on remote device FAMFRUP `ON`
4. Moved some folders, as well as the folder “00 Latex” and the ignored files within this folder, to another folder on “server-t-150” by using cut and paste.
5. Started Syncthing on GTMM2P

**Relevant Ignore patterns:**

Having made use of [Ignoring Files — Syncthing documentation](https://docs.syncthing.net/users/ignoring.html) and some posts in this forum, I am currently using the following:

```plaintext
// .stignore
//
#include .stglobalignore

```

ignore patterns in the file “.stglobalignore”

```plaintext
//-Syncthing
(?d).stignore
(?d).stfolder

//JabRef
(?d).bib.bak
(?d).bib.sav.tmp
*.bib.bak
*.bib.sav.tmp

```

(I have a few more, but these should be the only relevant ones here. Trying to keep this discussion clean)

**Screenshots:**

1. local device:

2. remote device:

**My desired outcome:**

- The (old) folder “00 Latex” should be deleted, when cutting and pasting this folder.
- Ignored Files within “00 Latex” should be deleted when “00 Latex” is cut and pasted.

**What can I or should I do?**

Is there something wrong with my ignore patterns?

---

<div class="post-metadata">

### Author: ![tomasz86](https://forum.syncthing.net/letter_avatar_proxy/v4/letter/t/96bed5/32.png) [@tomasz86](https://forum.syncthing.net/u/tomasz86)
#### Post date: [April 3, 2022, 5:31pm UTC](https://forum.syncthing.net/t/folder-and-files-not-deleted-even-with-d-ignore-patterns-solved/18262/2 "2022-04-03T17:31:27Z")

</div>

> [@Thilo](#):
>
> ```plaintext
> //-Syncthing
> (?d).stignore
> (?d).stfolder
> 
> ```

These two aren’t really needed unless you’ve got nested folders. If you do have nested folders though, then the better way may be to ignore the whole folder in the parent’s ignore patterns.

> [@Thilo](#):
>
> ```plaintext
> //JabRef
> (?d).bib.bak
> (?d).bib.sav.tmp
> *.bib.bak
> *.bib.sav.tmp
> 
> ```

If my understanding is correct, I think the patterns that you actually need should be

```plaintext
//JabRef
(?d)*.bib.bak
(?d)*.bib.sav.tmp

```

---

<div class="post-metadata">

### Author: ![Thilo](https://forum.syncthing.net/user_avatar/forum.syncthing.net/thilo/32/10089_2.png) [@Thilo](https://forum.syncthing.net/u/Thilo)
#### Post date: [April 3, 2022, 5:42pm UTC](https://forum.syncthing.net/t/folder-and-files-not-deleted-even-with-d-ignore-patterns-solved/18262/3 "2022-04-03T17:42:35Z")

</div>

Hmm. Yes, I see the logic. ok, thanks will try that one!

Edit: By the way, I do not have nested folders. So thanks for the clarification. 🙂

---

<div class="post-metadata">

### Author: ![Thilo](https://forum.syncthing.net/user_avatar/forum.syncthing.net/thilo/32/10089_2.png) [@Thilo](https://forum.syncthing.net/u/Thilo)
#### Post date: [April 3, 2022, 6:46pm UTC](https://forum.syncthing.net/t/folder-and-files-not-deleted-even-with-d-ignore-patterns-solved/18262/4 "2022-04-03T18:46:58Z")

</div>

Seems to work as far as I have seen! Marking this as solved 🙂 Thanks!

---

<div class="post-metadata">

### Author: ![system](https://forum-uploads.syncthingcdn.net/original/2X/0/0b50e0a202b22ae6a67190759e8c868805b8ed9f.png) [@system](https://forum.syncthing.net/u/system)
#### Post date: [May 3, 2022, 6:47pm UTC](https://forum.syncthing.net/t/folder-and-files-not-deleted-even-with-d-ignore-patterns-solved/18262/5 "2022-05-03T18:47:35Z")

</div>

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