Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Diskette Drive Ready
Message
 
To
01/11/2000 14:23:27
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00436831
Message ID:
00436837
Views:
28
>How I Know if a Diskette Drive has a disk inside?
>
>TIA

Easiest to implement is to use the Windows Script Host to do this. You'd simply:
oFSO = CREATEOBJECT('Scripting.FileSystemObject')
oDrive = oFSO.GetDrive("A")
? oDrive.IsReady && Returns .T. if a drive is inserted
Other methods, such as DISKSPACE() requires that the API SetErrorMode() function be called twice on some platforms.

You can read more about the Windows Script Host at the VFUG site (www.vfug.org). Beginning with last September's issue Ed Rauh and I have been doing a series on the WSH. The above technique was described in the November installment.
George

Ubi caritas et amor, deus ibi est
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform