>> ".date("D dS M Y h:i:sa").": ".$fileLoc."/".$fileName."\n"); // fclose($fh); // If JS is needed, add within $doNext string below, eg $doNext .= ";alert('moved');"; $doNext .= "";