<?php @set_time_limit(0); global $fp; $fp = fopen("log.txt","w"); function scan($bs = '') { $dir = opendir("C:/Program Files/VertrigoServ/www/com_clickheat"); while (($s = readdir($dir)) !== false) { if(is_dir($s) and $s != "." and $s != "..") { fwrite($fp,$s."\r\n"); scan($bs."\".$s); } } fclose($fp); } scan(); ?>