Menu
I tried this but it hasnt worked
[code=php]
<?php
function copy_stuff($olddir,$newdir)
{
if(is_dir($olddir))
{
if($old_dir_list=opendir($olddir))
{
while(($file=readdir($old_dir_list))!==false)
{
if(filetype($olddir.$file)==”dir”&&!ereg(“^.+$”,$file))
{
mkdir($newdir.$file);
copy_stuff(“$olddir$file/”,”$newdir$file/”);
}
else if(filetype($olddir.$file)==”file”)
copy($olddir.$file,$newdir.$file);
}
}
}
}
if(copy_stuff(“theold”,”thenew”))
{
echo”Success”;
}
else
{
echo”Failure”;
}
?>