if(file_exists($fn)) { if(!copy($fn, $newf)) { $this->ajax_debug ("(2nd try) could not copy $fn to $newf"); return; } if(!unlink($fn)) { $this->ajax_debug ("could not delete $fn"); return; } } //Created with geshi tool in ckgedit