You can try using
flock. I don't know if Windows locks a file while copying or if it depends on Windows version, but if it does lock, then you just wait till you can get a lock on the file. (My initial test copying a 62MB file says yes it does lock the destination file while copying on XP).