Forum Moderators: coopster
foreach($toBuild as $i){
$tempName = getFileName($i);
//copy the files to the archive
if(!(copy($i, "{$buildArchive}\\{$tempName}"))){
echo("There was an error in copying the file $tempName to the build archive.\\nThe files were not renamed.");
die();
}//if !copy
}//foreach
Other than that, I do not know. It shouldn't have anything to do with the number of files. Do you know how many times the error messages start appearing? How far into the file iterations? Are they the same files every time? There's a bunch to look at here.