# JSFL file path (without file name)

**URL:** <https://forum.kirupa.com/t/jsfl-file-path-without-file-name/321087>\
**Category:** flash\
**Created:** [April 10, 2011, 12:51pm UTC](https://forum.kirupa.com/t/jsfl-file-path-without-file-name/321087 "2011-04-10T12:51:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![smokin2008](https://avatars.discourse-cdn.com/v4/letter/s/3ab097/32.png) [@smokin2008](https://forum.kirupa.com/u/smokin2008)\
**Post date:** [April 10, 2011, 12:51pm UTC](https://forum.kirupa.com/t/jsfl-file-path-without-file-name/321087/1 "2011-04-10T12:51:44Z")

</div>

I want to get the path of the file (in which the script is run), with out the file name.

how to do that?

at present i have the following code:

```auto

var filename1=flash.documents[0].name;
fl.trace("this file name >>> "+filename1);
var filePath = flash.documents[0].path; // getting doc path
fl.trace("File path "+filePath); 

```

and i get the following in output window

```auto

this file name >>> testing2.fla
File path E:\Flash JSFL	est2	esting2.fla

```
