# It is possible to automatic exclude a file when an error ocoured in templater

**URL:** <https://forum.obsidian.md/t/it-is-possible-to-automatic-exclude-a-file-when-an-error-ocoured-in-templater/38884>\
**Category:** Help\
**Created:** [June 13, 2022, 12:06pm UTC](https://forum.obsidian.md/t/it-is-possible-to-automatic-exclude-a-file-when-an-error-ocoured-in-templater/38884 "2022-06-13T12:06:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shiinii](https://forum.obsidian.md/user_avatar/forum.obsidian.md/shiinii/32/30792_2.png) [@Shiinii](https://forum.obsidian.md/u/Shiinii)\
**Post date:** [June 13, 2022, 12:06pm UTC](https://forum.obsidian.md/t/it-is-possible-to-automatic-exclude-a-file-when-an-error-ocoured-in-templater/38884/1 "2022-06-13T12:06:40Z")

</div>

### Things I have tried

I have read templater documentation but dont encountered what i need.

### What I’m trying to do

Make the file exclusion when a templater error ocoured.

---

<div class="post-metadata">

**Author:** ![scholarInTraining](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/s/cc9497/32.png) [@scholarInTraining](https://forum.obsidian.md/u/scholarInTraining)\
**Post date:** [June 13, 2022, 3:56pm UTC](https://forum.obsidian.md/t/it-is-possible-to-automatic-exclude-a-file-when-an-error-ocoured-in-templater/38884/2 "2022-06-13T15:56:45Z")

</div>

I had this issue recently with a `.js` file in the folder that I had designated for user scripts for templater. I just moved it out of the folder and into a different one, since I was not actually using it with templater, and then templater stopped complaining. I assume the same trick can work for error-causing files in the folder designated for templates as well.

---

<div class="post-metadata">

**Author:** ![jwl](https://forum.obsidian.md/user_avatar/forum.obsidian.md/jwl/32/64519_2.png) [@jwl](https://forum.obsidian.md/u/jwl)\
**Post date:** [June 13, 2022, 8:45pm UTC](https://forum.obsidian.md/t/it-is-possible-to-automatic-exclude-a-file-when-an-error-ocoured-in-templater/38884/3 "2022-06-13T20:45:10Z")

</div>

This is also what I did.

---

<div class="post-metadata">

**Author:** ![system](https://forum.obsidian.md/uploads/default/original/3X/b/e/bec35fbd23ab28909bb6bfe62cb32eb82dd34019.png) [@system](https://forum.obsidian.md/u/system)\
**Post date:** [June 20, 2022, 8:45pm UTC](https://forum.obsidian.md/t/it-is-possible-to-automatic-exclude-a-file-when-an-error-ocoured-in-templater/38884/4 "2022-06-20T20:45:41Z")

</div>

Closed on June 20, 2022, 8:45pm UTC

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