Certainly possible. Try visiting php.net and looking at a set of:
PHP Code:
$dir = opendir('.');
while ($f = readdir($dir)) {
if ($f=='.'||$f=='..') { continue; } //skip this loop because you don't want the current directory or parent directory
//do something with $f which is the name of the next file/directory* in the directory, in a loop
//* you can skip directories by changing the if above to if (strpos($f,'.')==0)
}
closedir($dir);
http://www.php.net/manual/en/function.opendir.php
Lots of info there and on neighboring pages (see the navigation menu on the left, and all of the posts below each page).
If you still need help, go ahead and ask, but that should give you a great idea about the general use of these functions.
Bookmarks