Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Disk is full or write protected
Message
From
09/04/1998 16:27:29
Dave Nantais
Light speed database solutions
Ontario, Canada
 
 
To
09/04/1998 16:00:05
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00090901
Message ID:
00090912
Views:
24
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform