# File Event Listeners - Use of System Variable in Path

**URL:** https://forum.cloverdx.com/t/file-event-listeners-use-of-system-variable-in-path/1101
**Category:** CloverDX Platform
**Created:** [July 20, 2012, 12:00am UTC](https://forum.cloverdx.com/t/file-event-listeners-use-of-system-variable-in-path/1101 "2012-07-20T00:00:00Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![ashok](https://avatars.discourse-cdn.com/v4/letter/a/ed655f/32.png) [@ashok](https://forum.cloverdx.com/u/ashok)
#### Post date: [July 20, 2012, 12:00am UTC](https://forum.cloverdx.com/t/file-event-listeners-use-of-system-variable-in-path/1101/1 "2012-07-20T00:00:00Z")

</div>

Is there a way to use system environment variable in the observed file path of a file event listener? If so, can you provide an example?

---

<div class="post-metadata">

### Author: ![David\_Hlidek](https://avatars.discourse-cdn.com/v4/letter/d/58f4c7/32.png) [@David\_Hlidek](https://forum.cloverdx.com/u/David_Hlidek)
#### Post date: [July 23, 2012, 1:22pm UTC](https://forum.cloverdx.com/t/file-event-listeners-use-of-system-variable-in-path/1101/2 "2012-07-23T13:22:08Z")

</div>

Dear ashok,

there is currently no such functionality. We already discussed this possibility, but newer issue was created. So I did it - [https://bug.javlin.eu/browse/CLS-824](https://bug.javlin.eu/browse/CLS-824)

---

<div class="post-metadata">

### Author: ![ashok](https://avatars.discourse-cdn.com/v4/letter/a/ed655f/32.png) [@ashok](https://forum.cloverdx.com/u/ashok)
#### Post date: [July 23, 2012, 4:29pm UTC](https://forum.cloverdx.com/t/file-event-listeners-use-of-system-variable-in-path/1101/3 "2012-07-23T16:29:19Z")

</div>

Thanks Jaroslav.

In the interim, do you have a groovy code that can actually read the system env variable, check if the file exists and then delete the file after raising the event?

Thanks,  
Ashok

---

<div class="post-metadata">

### Author: ![David\_Hlidek](https://avatars.discourse-cdn.com/v4/letter/d/58f4c7/32.png) [@David\_Hlidek](https://forum.cloverdx.com/u/David_Hlidek)
#### Post date: [August 13, 2012, 6:16am UTC](https://forum.cloverdx.com/t/file-event-listeners-use-of-system-variable-in-path/1101/4 "2012-08-13T06:16:17Z")

</div>

Hi Ashok,

nope, but it should be easy for you to write one 🙂
