$directory\n

$directory

\n"); $files=opendir ($directory); while (false!==($file = readdir($files))) { if ($file != "." && $file != "..") { if(is_dir($directory.$file)) echo("[DIR] "); //echo "$directory$file\n"; echo "$directory$file\n"; $GLOBALS["num"] = ($GLOBALS["num"] + 1); if(is_dir($directory.$file)) dir_scan($directory.$file.$slash,$slash); } } closedir($files); } ///CODE//////////////////////// $num = "0"; dir_scan("x:\\", "\\"); echo("\nTotal: $num\n"); ?>