>Does anyone know of a way to check for write protection on a diskette using a Visual FoxPro command? More importantly, is there a way to trap the "error"?
>
>Thanks, Rob
You could try it the way Windows '95 checks for Windows NT file/directory permissions -- it doesn't! <s>
What is does is it tries to create a dummy file on the questionable directory. If that succeeds, then it knows it can create a file in the directory and goes on doing what it was supposed to do in the first place.
Try opening a dummy file for write on the drive. Make sure to use ON ERROR and try to trap the error in your custom error handling procedure. Then just delete the dummy file if it succeeds.
alistair israel
Distressed DBA, Sleepy SysAd, Weary WebMaster (aka Senior Software Engineer)
aisrael@poboxes.com
Makati City, Philippines