What's not working ? Is the comparefiletimes() returning something odd or is the copy command not working... put debug statements in your code, check the value of @ERROR after your copy, or single step through your script by using the kix32.exe /d switch.

Shawn.