And now I have to post AGAIN due to lack of perfectionism...

Make the following correction: (replace line)
$date_old=getfiletime("$dirarray[$counter]\$currentfile")