# FSCrawler excludes, Windows server

**URL:** <https://discuss.elastic.co/t/fscrawler-excludes-windows-server/296689>\
**Category:** Elasticsearch\
**Created:** [February 9, 2022, 7:33am UTC](https://discuss.elastic.co/t/fscrawler-excludes-windows-server/296689 "2022-02-09T07:33:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![newschapmj1](https://avatars.discourse-cdn.com/v4/letter/n/dbc845/32.png) [@newschapmj1](https://discuss.elastic.co/u/newschapmj1)\
**Post date:** [February 9, 2022, 7:33am UTC](https://discuss.elastic.co/t/fscrawler-excludes-windows-server/296689/1 "2022-02-09T07:33:14Z")

</div>

Has anyone had success with using excludes in FSCrawler on Windows servers?  
Are there are any known limitations?  
e.g. can you exclude only top level folders or can you exclude deeper folder s eg folder1\sub1\sub2\sub3\*.\*

What is the syntax?  
Are folders / in Windows or \ or \\ (as with the url setting in \_settings.yaml) ?

If you are connecting to shared folder  
"\\server1.domain.local\share1$" do you ignore that part of the path in the excludes statement?

[https://fscrawler.readthedocs.io/en/fscrawler-2.9/admin/fs/local-fs.html?highlight=excludes#includes-and-excludes](https://fscrawler.readthedocs.io/en/fscrawler-2.9/admin/fs/local-fs.html?highlight=excludes#includes-and-excludes)

Unfortunately we cannot easily add .fscrawlerignore to specific folders  
"If a folder contains a file named `.fscrawlerignore` , this folder and its subfolders will be entirely skipped."

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [February 9, 2022, 9:57am UTC](https://discuss.elastic.co/t/fscrawler-excludes-windows-server/296689/2 "2022-02-09T09:57:29Z")

</div>

I don't know exactly what the syntax is.  
I think that if you start FSCrawler in debug mode with `--debug`, you will see some traces giving the path of the file which is checked.

```auto
logger.debug("directory = [{}], filename = [{}], includes = [{}], excludes = [{}]", directory, filename, includes, excludes);

```

Could you share one of those lines here so I can know how it works on Windows? 😉

After we found the solution, I'd really appreciate if you could add your findings in FSCrawler documentation with a pull request.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [March 9, 2022, 9:57am UTC](https://discuss.elastic.co/t/fscrawler-excludes-windows-server/296689/3 "2022-03-09T09:57:47Z")

</div>

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