>*available drives on system >cr=chr(13) >local m.x >m.x="Available discs on system :"+chr(13)+chr(13) >for i=97 to 122 > if directory( chr(i)+":\" ) > m.x=m.x+upper(chr(i))+cr > endif >endfor >messagebox(m.x) >>
>Declare Integer GetLogicalDrives In kernel32 >Declare Integer GetDriveType In kernel32 String nDrive > >Local nDrivesMask, nIndex, nShift, cDrive,x >nDrivesMask = GetLogicalDrives() > > >m.x= "Available disk drives/Type:"+Chr(13)+chr(13) > >nIndex = 0 >Do While .T. > nShift = Bitlshift(1, nIndex) > cDrive = Chr(nIndex + 65) + ":" > > If Bitand(nDrivesMask, nShift) = nShift > m.x=m.x+ Trans(cDrive)+" "+ Trans(GetDriveType(cDrive)) > > Do Case > Case GetDriveType(cDrive)=0 > m.x=m.x+" No type" > Case GetDriveType(cDrive)=2 > m.x=m.x+" Floppy disk" > Case GetDriveType(cDrive)=3 > m.x=m.x+" Hard disk" > Case GetDriveType(cDrive)=4 > m.x=m.x+" Removable drive or network drive" > Case GetDriveType(cDrive)=5 > m.x=m.x+" CD-ROM" > Case GetDriveType(cDrive)=6 > m.x=m.x+" RAM disk(1)" > Endcase > m.x=m.x+chr(13) > Endif > > If nShift > nDrivesMask > Exit > Endif > > nIndex = nIndex + 1 >Enddo >Messagebox(m.x,0+32+4096,"Discs on system") >