Count Files on Directory?
Posted: Sat Jun 26, 2010 6:05 pm
Hi all.
I need to know how can i count files using the first 3 beginning letter of file name:
this is the code i'm using, it list and sort the files on the directory bu I need to count it:
for ($count=0;$count<count($filelist);$count++)
{
$filename=$filelist[$count];
if (!is_dir($filename))
$nombase=(basename($filename));
printf (substr("$nombase", 0, 2));
}
All files start with two number or letter example:
Files Total
10 35
13 55
15 25
16 29
Thank in advance
I need to know how can i count files using the first 3 beginning letter of file name:
this is the code i'm using, it list and sort the files on the directory bu I need to count it:
for ($count=0;$count<count($filelist);$count++)
{
$filename=$filelist[$count];
if (!is_dir($filename))
$nombase=(basename($filename));
printf (substr("$nombase", 0, 2));
}
All files start with two number or letter example:
Files Total
10 35
13 55
15 25
16 29
Thank in advance