function move_files($src, $dst)
{
$handle = opendir($src);
if (!is_dir($dst)) mkdir($dst, 0755);
while ($file = readdir($handle))
{
if (($file != ".") and ($file != ".."))
{
$src_path = $src."/".$file;
$dst_path = $dst."/".$file;
if (is_dir($src_path))
{
move_files($src_path, $dst_path);
}
else
{
copy($src_path, $dst_path);
unlink($src_path);
}
}
}
closedir($handle);
rmdir($src);
}
move_files("d:\\test", "d:\\test_1");