Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Returning Drive Information
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00184270
Message ID:
00184409
Views:
23
Hi Jason,

You can also use the FileSystemObject provided by the Windows Scripting Host to do this:
* FindCDRom()
#define nCDRom 4
fso = CreateObject("Scripting.FileSystemObject")
  oDrivesCollection = fso.Drives
  For Each oDrive in oDrivesCollection
    If oDrive.DriveType = nCDRom
      cDriveLetter = oDrive.DriveLetter
    EndIf
  Next
return cDriveLetter
WSH is available for download for Windows 95, and is built into Windows 98 and NT. You'll find it along with more extensive information at Microsoft's Sripting Technologies site.

>I need to find out the specifc drive letter being used for the CDROM drive. If there anything in VFP50 that will return the value. I know that os() returns the operating system. Is there anything like that in VFP that will return the CDROM drive = D:\ or F:\. Something to that nature.
>Thanks is advance
>Jason Hall
kenweber
GCom2 Solutions
Microsoft Certified Professional

Previous
Reply
Map
View

Click here to load this message in the networking platform