oNet = CREATEOBJECT('WScript.Network') oDrives = oNet.EnumNetworkDrives FOR lni = 0 TO oDrives.Count - 1 ? oDrives.Item(lni), oDrives.Item(lni + 1) NEXTOptional the API's GetLogicalDrives function returns an integer that can be parsed to determine whether or not the drive exists.
DECLARE INTEGER GetLogicalDrives IN Win32API lndrives = GetLogicalDrives() FOR lni = 0 TO 25 lcdrive = CHR(65 + lni) IF BITTEST(lndrives, lni) THEN ? lcdrive + " exists" ELSE ? lcdrive + " does not exist" ENDIF NEXT