Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Write Protection
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00004859
Message ID:
00004864
Vues:
45
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform