# Counting files in a directory and passing the count back to flash

**URL:** <https://forum.kirupa.com/t/counting-files-in-a-directory-and-passing-the-count-back-to-flash/50770>\
**Category:** flash\
**Created:** [May 6, 2004, 8:07am UTC](https://forum.kirupa.com/t/counting-files-in-a-directory-and-passing-the-count-back-to-flash/50770 "2004-05-06T08:07:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![vinterstille](https://avatars.discourse-cdn.com/v4/letter/v/b9e5f3/32.png) [@vinterstille](https://forum.kirupa.com/u/vinterstille)\
**Post date:** [May 6, 2004, 8:07am UTC](https://forum.kirupa.com/t/counting-files-in-a-directory-and-passing-the-count-back-to-flash/50770/1 "2004-05-06T08:07:27Z")

</div>

Hi there,

Im trying to create a fully automated photo gallery - where my client only needs to upload image (jpg) to a ftp server and Flash / php takes care of the rest.

I´ve found a almost completely automated gallery that only needs to be told how many files it should read from a given directory. How do I make Flash and php read the number of files in a directory and pass that variable back to flash?

The gallery i want to use is located here: [http://www.flashkit.com/movies/Scripting/Using\_External\_Files/photogal-buggedco-7797/index.php](http://www.flashkit.com/movies/Scripting/Using_External_Files/photogal-buggedco-7797/index.php)

ANY help will be greatly accepted…

.vinterstille
