Hi, I’m working on my company's intranet and creating a "live directory". All that means is that all of the departments have a separate directory that they can throw files into and I create a virtual directory off the "intranet" web server (IIS 5/PHP 4.4.2) to that folder/index.php. All the script does is read the directories and creates list items for them then it reads the files, excludes a few and creates another set of list items, the style sheet comes in after that. It is a work in progress and is growing as I learn how to do more things. The problem is that my users are too dumb to copy an index.php file to the new sub directory they've just created, so I was looking for a way I could have a function that upon clicking the link to get to the newly created folder it actually goes ahead and verifies that that file is in there. If it is not in there then copy it from a master folder. Is this even possible? And if it is could someone give me a direction to go in because I’m absolutely stumped. [code]echo '<div id=path>'; echo str_replace('/', ' ', dirname($_SERVER['PHP_SELF'])); echo '</div></div>'; echo '<div id=navcontainer><ul id=tabnav>'; $handle = opendir("./"); while (($file = readdir($handle))!==false) { if(is_dir($file)){ if($file != "." && $file != ".."){ echo "<li><a href=$file>$file</a></li>"; } } } if ( isset($execute) ){ checkindexexists(); } echo "</ul><div class=content><ul>"; $handle = opendir("./"); while (($file = readdir($handle))!==false) { if(is_file($file)){ if($file != "." && $file != ".."){ $split = explode(".", $file); $proper = $split[0]; $ext = $split[1]; if ($ext !== 'php'){ if ($proper !== stristr($proper, '~')){ $filename = rawurlencode($file); echo "<li><a href=$filename>$proper</a></li>\n"; } } } } } echo "</ul></div>"; closedir($handle);[/code]