# Counting .jpgs in a directory

**URL:** <https://forum.kirupa.com/t/counting-jpgs-in-a-directory/67136>\
**Category:** flash\
**Created:** [October 12, 2004, 10:46pm UTC](https://forum.kirupa.com/t/counting-jpgs-in-a-directory/67136 "2004-10-12T22:46:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![X\_treme1](https://avatars.discourse-cdn.com/v4/letter/x/6de8d8/32.png) [@X\_treme1](https://forum.kirupa.com/u/X_treme1)\
**Post date:** [October 12, 2004, 10:46pm UTC](https://forum.kirupa.com/t/counting-jpgs-in-a-directory/67136/1 "2004-10-12T22:46:00Z")

</div>

Hey, for my portfolio I need to be able to count the amount of .jps in a given directory for a nice display in flash. I’m pretty sure I’ve heard of a php way to do this, can someone help me out on the details of counting files in a directory then storing that number to a variable with php?

Or if its do-able in flash MX alone I’d rather use that method.
