Information générale
Catégorie:
Codage, syntaxe et commandes
>Does anyone know how to trap out the error when copying files to a full or write protected disk? Instead of returning "Disk is Full" or something like that, VFP gives me "Invalid Path or Filename"
If you are executing the copy command from a form or any container object that has an ERROR event you can trap the error with code inside that method.
if any code is placed in the Error method then the method is executed
Three parameters are passed to the method , namely , nError , cMethod , and nLine
I believe nError will equal 202 when you have this problem.
Just use some IF statements to handle this error.
I hope this helps,
David
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement