ofso=createobject("scripting.filesystemobject") *!* * Enumerate CD-ROMs, removable drives and Floppy loDrives = EnumerateDrivesEx("ALL") *----------------------------------------- function EnumerateDrivesEx lparameters tcTypes2Return * tcTypes2Return - a list of drive types to return. ALL is default local lcTypeList, loDrives as collection, lnI, lnDriveType, lcDriveType, lcTypes2Return, loShellApp, lcTypeExtended lcTypes2Return = upper(evl(tcTypes2Return, "ALL")) loDrives = createobject("Collection") lcTypeList = "UNKNOWN,REMOVABLE,FIXED,NETWORK,CDROM,RAMDISK" loShellApp = createobject("Shell.Application") for lnI = asc("A") to asc("Z") lnDriveType = drivetype(chr(lnI)) if between(lnDriveType, 2, 6) lcDriveType = getwordnum(lcTypeList, lnDriveType, [,]) if lcDriveType == "REMOVABLE" ; and "FLOPPY" $ upper(loShellApp.NameSpace(chr(lnI)+ ":").self.type) lcDriveType = "FLOPPY" endif if lcTypes2Return = "ALL" or (lcDriveType $ lcTypes2Return) loDrives.add(lcDriveType, chr(lnI)+":") endif endif endfor return loDrives