Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Odd Errors
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00167274
Message ID:
00167361
Vues:
19
>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.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform