Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Check if a drive is a CD-ROM?
Message
From
11/03/2000 01:16:59
 
 
To
10/03/2000 15:19:19
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00344236
Message ID:
00344542
Views:
17
>>I'd like to use GETFILE() to ask a user to find a specific file. Then I'd like to determine if that specified file is on a CD-ROM.
>>
>>Is there an API function that will return the drive type of a passed drive letter? If so, could someone please provide a code sample?
>>
>>TIA.
>
>the WSH method would go like:
>
>oFSO = CreateObject("Scripting.FileSystemObject")
>oDrive = oFSO.GetDrive("D:")
>?oDrive.DriveType
>
>Drive type returns a numeric, where 4 corresponds to a CD-ROM.
>
>George- since Ed is absent, may I slap you?

Actually, you can't slap George in this particular instance. I'm running on NT 3.51, which does not support WSH. Of course, George knew that ;-)
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
Previous
Reply
Map
View

Click here to load this message in the networking platform