I know I can do this...
glob(\'/dir/somewhere/*.zip\');
...to get all files ending in .zip, but is there a way to return all f
.zip
$dir = "/path"; if (is_dir($dir)) { if ($d = opendir($dir)) { while (($file = readdir($d)) !== false) { if ( substr($file, -3, 3) != "zip" ){ echo "filename: $file \n"; } } closedir($d); } }
NB: "." and ".." not taken care of. Left for OP to complete