Hello I'm having problems with the following code: if (! ($dp = opendir($imagesdir))) die ("cannot open $imagesdir."); while($file = readdir($dp)) { if ($file != '.' && $file != '..') { ///////Second test doesn't seem to catch sub-directories under $imagesdir if(is_dir($file)) ///// This is not evaluating properly!!! { echo "<td bgcolor=blue>"; echo $file; echo "Directory"; echo "</td>"; } else { echo "<td>"; echo $file; echo "<br></a>"; echo "Filesize: "; echo filesize($file); ///// This is not evaluating properly either!!! echo "</td>"; } } } closedir($dp); echo "</tr></table><center></body></html>"; ?> Can't figure out why this doesn't work. I was thinking perhaps that it might be directory permissions but that doesn't make sense. It would seem to me that the ($file = readdir($dp)) is not returning any file attributes perhaps just text. I could swear that I'v used this same routine to achieve these results. Any help appreciated!! FYI: Running php as an ASAPI filter, on IIS 5.1, using Windows XP/2003, using -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php