Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to catch absent disk error on aDir()?
Message
De
21/03/2012 15:54:14
 
 
À
21/03/2012 15:33:47
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2003
Database:
MS SQL Server
Divers
Thread ID:
01538758
Message ID:
01538956
Vues:
35
>>>>Hmm, if you know the name of the folder you're looking for, VFP DIRECTORY() works for me. On my system I have a hard drive C:, an optical drive D: with no medium in the drive, and drive U: does not exist. The folder C:\Something\ does not exist:
>>>>
>>>>?DIRECTORY( "C:\Something" ) && .F.
>>>>?DIRECTORY( "D:\Something" ) && .F.
>>>>?DIRECTORY( "U:\Something" ) && .F.
>>>>
>>>>* no OS dialogs or errors
>>>>
>>>
>>>Tried that, but my OS complained again.
>>
>>Really? What type of drive/medium/lack of medium? What was the error/dialog?
>
>Memory card reader with empty slots. See screenshot.

OK, I guess an empty optical drive is somehow treated differently from an empty card reader "drive".

I see you've worked around the issue using the FSO. However, I *think* WMI has a lot of detailed information about storage devices. I don't know if that includes (reliable) information about the presence of media.
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform