# Accessing variable PDf files in a folder

**URL:** <https://forum.kirupa.com/t/accessing-variable-pdf-files-in-a-folder/284636>\
**Category:** flash\
**Created:** [March 21, 2009, 1:26pm UTC](https://forum.kirupa.com/t/accessing-variable-pdf-files-in-a-folder/284636 "2009-03-21T13:26:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Horicolonoma](https://avatars.discourse-cdn.com/v4/letter/h/aca169/32.png) [@Horicolonoma](https://forum.kirupa.com/u/Horicolonoma)\
**Post date:** [March 21, 2009, 1:26pm UTC](https://forum.kirupa.com/t/accessing-variable-pdf-files-in-a-folder/284636/1 "2009-03-21T13:26:20Z")

</div>

Hi all

I am new to this forum and I wish to share my intermediate knowledge of AS2 with you people!

I have the following problem or question:

**How can I access files from a certain directory to make links of them?**  
The idea is to make a directory on the server (e.g: “/PDF”). The user can upload and delete these files and they can have different filenames.  
How can I let flash search the folder and print these filenames as links, so the user can click and access these files?

Scheme:

- search folder ("/PDF") for amount of files
- for (i, i++, i\<“amount of files”){  
make new textfield (i)  
put filenames in textfield (i)  
textfield.onPress = function(){  
Open (link to different filename)  
}  
}

Hope you understand what I am meaning? I think the solution is to combine the actionscript with Php.

Thanks!
