# How to open a PDF file only using folder & file name?

**URL:** <https://forum.kirupa.com/t/how-to-open-a-pdf-file-only-using-folder-file-name/330425>\
**Category:** flash\
**Created:** [January 19, 2013, 6:56pm UTC](https://forum.kirupa.com/t/how-to-open-a-pdf-file-only-using-folder-file-name/330425 "2013-01-19T18:56:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![learner\_7n](https://avatars.discourse-cdn.com/v4/letter/l/b2d939/32.png) [@learner\_7n](https://forum.kirupa.com/u/learner_7n)\
**Post date:** [January 19, 2013, 6:56pm UTC](https://forum.kirupa.com/t/how-to-open-a-pdf-file-only-using-folder-file-name/330425/1 "2013-01-19T18:56:57Z")

</div>

Hi,

The following code is working fine. But I want to open the same file using short file path. I am keeping the folder (with all PDF files) in same folder where my index.html file exists.

How to modify the following code to achieve the same:

```auto
MainContainer.NavigationPanel.Procedure.addEventListener(MouseEvent.CLICK,ProcedureClickHandler);
function ProcedureClickHandler(event:MouseEvent):void {
    navigateToURL (new URLRequest ("http://MyServer/info/WebFolder/Docs/Procedure.pdf"));}

```

Instead of the above long path I would like to have path like “[COLOR=#ff0000] **Docs/Procedure.pdf** [/COLOR]” as newURLRequest.

How to modify it? Please help.
