# Number of files in a folder

**URL:** <https://forum.kirupa.com/t/number-of-files-in-a-folder/34264>\
**Category:** programming\
**Created:** [October 30, 2003, 3:25pm UTC](https://forum.kirupa.com/t/number-of-files-in-a-folder/34264 "2003-10-30T15:25:40Z")\
**Posts on this page:** 1\
**Page:** 2

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 12, 2004, 6:38pm UTC](https://forum.kirupa.com/t/number-of-files-in-a-folder/34264/21 "2004-07-12T18:38:45Z")

</div>

One of the guys at [AS.org](http://AS.org) helped me out with this one.

```auto
[color=black]myLV = new LoadVars(); 
myLV.onLoad = function(success) 
{ 
if (success) 
{ 
trace(unescape(this)); 
_level0.num_txt.text = this.numberOfFiles; 
for (i = 1 ; i <= parseInt(this.numberOfFiles) ; i++) 
{ 
_level0.box.duplicateMovieClip("box" + i, i + 1000); 
_level0["box" + i]._x = _level0.box._x + _level0.box._width * i * 2; 
} 
} 
} 
myLV.load("thumbcounter.php"); 

```

[/color]

[color=black]It works fine now. Just have to do some reading up on why it wasn’t working in the first place. Thanks for your help guys. I appreciate it.[/color]

[Previous page](https://forum.kirupa.com/t/number-of-files-in-a-folder/34264.md?page=1)
