# ignoreFiles not working in Windows

**URL:** <https://discourse.gohugo.io/t/ignorefiles-not-working-in-windows/4231>\
**Category:** support\
**Created:** [October 4, 2016, 3:43pm UTC](https://discourse.gohugo.io/t/ignorefiles-not-working-in-windows/4231 "2016-10-04T15:43:09Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Raymond\_Camden](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/raymond_camden/32/1076_2.png) [@Raymond\_Camden](https://discourse.gohugo.io/u/Raymond_Camden)\
**Post date:** [October 4, 2016, 3:43pm UTC](https://discourse.gohugo.io/t/ignorefiles-not-working-in-windows/4231/1 "2016-10-04T15:43:09Z")

</div>

I’ve used the following ignoreFiles setting in OSX to help improve Hugo’s speed - it works great for local dev:

ignoreFiles = [“post/2003”,“post/2004”,“post/2005”,“post/2006”,“post/2007”,“post/2008”,“post/2009”,“post/2010”,“post/2011”,“post/2012”,“post/2013”,“post/2014”]

When I tested on Windows, I noticed it didn’t work. I figured it was perhaps the slashes, so I added to the end of my list:

“post\2003”,“post\2004”

just as a quick test, and Hugo still processes items from those years. Any idea why?

I also tried post[\/]2003 as a way to handle both Win/OSX in one match, but that failed 🙂

---

<div class="post-metadata">

**Author:** ![Raymond\_Camden](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/raymond_camden/32/1076_2.png) [@Raymond\_Camden](https://discourse.gohugo.io/u/Raymond_Camden)\
**Post date:** [October 4, 2016, 3:51pm UTC](https://discourse.gohugo.io/t/ignorefiles-not-working-in-windows/4231/2 "2016-10-04T15:51:05Z")

</div>

So I went with

```auto
.*200X.*

```

and it seems to work well, and I’m assuming will work fine back on OSX.

---

<div class="post-metadata">

**Author:** ![Raymond\_Camden](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/raymond_camden/32/1076_2.png) [@Raymond\_Camden](https://discourse.gohugo.io/u/Raymond_Camden)\
**Post date:** [October 4, 2016, 5:43pm UTC](https://discourse.gohugo.io/t/ignorefiles-not-working-in-windows/4231/3 "2016-10-04T17:43:45Z")

</div>

Just as an FYI, the forum system here is stripping out some of my characters. It should be “period asterix” not just period in the example above.

---

<div class="post-metadata">

**Author:** ![moorereason](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/moorereason/32/592_2.png) [@moorereason](https://discourse.gohugo.io/u/moorereason)\
**Post date:** [October 5, 2016, 8:10pm UTC](https://discourse.gohugo.io/t/ignorefiles-not-working-in-windows/4231/4 "2016-10-05T20:10:00Z")

</div>

The patterns are regular expressions (regex). In regex, “” starts an escape sequence. Something like this should work: `post[/\\][0-9]{4}`. Translated, that matches “post” followed by “” or “/”, which is then followed by 4 digits.

---

<div class="post-metadata">

**Author:** ![Raymond\_Camden](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/raymond_camden/32/1076_2.png) [@Raymond\_Camden](https://discourse.gohugo.io/u/Raymond_Camden)\
**Post date:** [October 5, 2016, 8:49pm UTC](https://discourse.gohugo.io/t/ignorefiles-not-working-in-windows/4231/5 "2016-10-05T20:49:10Z")

</div>

Thanks.
