>hello! im new member and i'm just a novice user of Visual FoxPro. > >my question is how will i identify that a disk in drive present or not. can u give me the code on ho to detect drives? > >jay
Jay, Welcome. You can try this one :
? IsReadyDrive('a')
function IsReadyDrive
Lparameters tcDriveName
oFS = CREATEOBJECT('Scripting.FileSystemObject')
Foreach oDrv in oFS.Drives
If oDrv.DriveLetter = upper(tcDriveName)
Return oDrv.IsReady
EndifEndforReturn .F.