int copy ( string source, string dest)
thats the copy function. If you are scanning a directory looking only for .mp3 files, then you could use:
<?php
$dir="source/dir/";
$dir2="dest/dir/";
if ($handle = opendir('.')) {
while (false !== ($file = readdir($handle))) {
if ($file != "." && $file != "..") {
$temp=explode(".",$file);
if($temp[(count($temp)-1)]){
if (!copy($dir.$file,$dir2.$file))
{
print ("$file copy fail");
}
}
}
closedir($handle);
}
?>