# Is it possible to count the number of files in a folder?

**URL:** <https://community.dynatrace.com/t/is-it-possible-to-count-the-number-of-files-in-a-folder/51100>\
**Category:** Extensions\
**Tags:** windows, dynatrace-managed, extensions\
**Created:** [April 7, 2025, 7:22pm UTC](https://community.dynatrace.com/t/is-it-possible-to-count-the-number-of-files-in-a-folder/51100 "2025-04-07T19:22:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![anapaulasalas](https://avatars.discourse-cdn.com/v4/letter/a/fbc32d/32.png) [@anapaulasalas](https://community.dynatrace.com/u/anapaulasalas)\
**Post date:** [April 7, 2025, 7:22pm UTC](https://community.dynatrace.com/t/is-it-possible-to-count-the-number-of-files-in-a-folder/51100/1 "2025-04-07T19:22:39Z")

</div>

Hello

In windows, I have a service that creates and deletes files as requests are being started/finalized inside a folder. When the number of files is too high it starts to slow down all of the services related. I want to create a metric that counts this number and create a problem when it reaches certain number of files.

Is there an extension or a way to do this in Dynatrace?

Thanks

---

<div class="post-metadata">

**Author:** ![marco\_irmer](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/marco_irmer/32/3038_2.png) [@marco\_irmer](https://community.dynatrace.com/u/marco_irmer)\
**Post date:** [April 7, 2025, 7:30pm UTC](https://community.dynatrace.com/t/is-it-possible-to-count-the-number-of-files-in-a-folder/51100/2 "2025-04-07T19:30:39Z")

</div>

I believe the [Filesystem monitoring extension](https://www.dynatrace.com/hub/detail/filesystem-monitoring-extension-v2) can do this.

---

<div class="post-metadata">

**Author:** ![adam\_gardner](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/adam_gardner/32/20087_2.png) [@adam\_gardner](https://community.dynatrace.com/u/adam_gardner)\
**Post date:** [April 7, 2025, 11:51pm UTC](https://community.dynatrace.com/t/is-it-possible-to-count-the-number-of-files-in-a-folder/51100/3 "2025-04-07T23:51:39Z")

</div>

Another option is to use the OpenTelemetry collector [filestats receiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/filestatsreceiver)&nbsp;- then send the metrics to Dynatrace
