# Counting images in a folder

**URL:** <https://forum.kirupa.com/t/counting-images-in-a-folder/167676>\
**Category:** Uncategorized\
**Created:** [October 30, 2005, 11:33pm UTC](https://forum.kirupa.com/t/counting-images-in-a-folder/167676 "2005-10-30T23:33:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![noknockers](https://avatars.discourse-cdn.com/v4/letter/n/54ee81/32.png) [@noknockers](https://forum.kirupa.com/u/noknockers)\
**Post date:** [October 30, 2005, 11:33pm UTC](https://forum.kirupa.com/t/counting-images-in-a-folder/167676/1 "2005-10-30T23:33:15Z")

</div>

i’ve made a small personal photo gallery in which different days(folders of images) a specified long the top where the user can click and see what is contained within that day(folder). It’s completely dynamic to the extent that the only thing i have to specify is the number of images in each folder as a variable in a txt file (i txt file for each folder)

What i want to know is if it’s possible to dynamically count the images in a folder and use that as a variable for the number of images contained within that folder…so i dont have to have a txt file for every day with the variable in it(like i do now)

I’m sure it’s quite simple but i cant find solution anywhere.
