# application.getHostApplicationPath()

**URL:** <https://forum.servoy.com/t/application-gethostapplicationpath/9039>\
**Category:** Classic Servoy\
**Created:** [April 24, 2008, 2:37pm UTC](https://forum.servoy.com/t/application-gethostapplicationpath/9039 "2008-04-24T14:37:32Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![martinh](https://avatars.discourse-cdn.com/v4/letter/m/848f3c/32.png) [@martinh](https://forum.servoy.com/u/martinh)\
**Post date:** [April 24, 2008, 2:37pm UTC](https://forum.servoy.com/t/application-gethostapplicationpath/9039/1 "2008-04-24T14:37:32Z")

</div>

Could you please provide the following function:

application.getHostApplicationPath()

This function should return:

C:\Program Files\Servoy3.5.5

if that is the path where my Servoy is installed.

I need this request, because some files must be created under the Servoy Installation Directory.

---

<div class="post-metadata">

**Author:** ![patrick](https://avatars.discourse-cdn.com/v4/letter/p/b2d939/32.png) [@patrick](https://forum.servoy.com/u/patrick)\
**Post date:** [April 24, 2008, 3:22pm UTC](https://forum.servoy.com/t/application-gethostapplicationpath/9039/2 "2008-04-24T15:22:56Z")

</div>

You could try

```auto
var vPath = new java.io.File(new java.io.File(" ").getAbsolutePath()).getParent();

```

But this works only in developer. From what I understand what you want is the directory of Servoy on the server?

---

<div class="post-metadata">

**Author:** ![martinh](https://avatars.discourse-cdn.com/v4/letter/m/848f3c/32.png) [@martinh](https://forum.servoy.com/u/martinh)\
**Post date:** [April 24, 2008, 3:54pm UTC](https://forum.servoy.com/t/application-gethostapplicationpath/9039/3 "2008-04-24T15:54:36Z")

</div>

> From what I understand what you want is the directory of Servoy on the server?

Yes, indeed that is what I want

---

<div class="post-metadata">

**Author:** ![patrick](https://avatars.discourse-cdn.com/v4/letter/p/b2d939/32.png) [@patrick](https://forum.servoy.com/u/patrick)\
**Post date:** [April 25, 2008, 7:38am UTC](https://forum.servoy.com/t/application-gethostapplicationpath/9039/4 "2008-04-25T07:38:59Z")

</div>

But then it is not good enough to know the path. You also need a way to transfer the file to the server. Have a look at IT2BE’s (free) Tools plugin. I think it has a method to transfer files to the server.

---

<div class="post-metadata">

**Author:** ![martinh](https://avatars.discourse-cdn.com/v4/letter/m/848f3c/32.png) [@martinh](https://forum.servoy.com/u/martinh)\
**Post date:** [April 25, 2008, 8:11am UTC](https://forum.servoy.com/t/application-gethostapplicationpath/9039/5 "2008-04-25T08:11:57Z")

</div>

In my case I need it for a webclient solution.  
So in that case files are read/written from/to server and not the client

But I can imagine that there should be also support for reading/writing files serverside and not clientside within smartclient and that those files must be written in a subdirectory of the Servoy installation directory
