>I am trying to copy files from one machine to another and I am encountering odd errors when doing so. The majority of the files will be copied but there may be 1 or 2 that do not. It is not usually the same file and it is random when happening, sometimes I get it sometimes I do not. Below is the Code. I always check for the files existance before I start and the file exists otherwise it would not try to copy it. I have physically checked and the file does exist.
>
>COPY FILE (_chrDrivePri + _chrZipPath + chrZipFileName) TO ;
>(_chrLocalDrive + _chrZipPath + chrZipFileName)
>
>The error message is # 1104 and states "Error Reading file"
Is the file on local, removable media, like a floppy, CD or Zip disk? Most of the times I've seen this the error has involved timeouts during the copy process; a dirty CD, intermittently bad floppy, or a Zip Disk getting ready to undergo 'click-death' have all produced this error, as have flakey network connections.
You might try using the Win32 API call CopyFile(); it won't produce a VFP visible error, but if an error occurs, the result is trappable based on the return code from the API call.