You can use the folowing code i found in DLL plugin TEST script to
detect if a drive is revovable.

with GetDriveType you pass the drive path like ?"C:\" ...

- - - - - - - - - - - - - - - - - - -
local vDrType = vec.create(7)
vDrType[0] = "unknown"
vDrType[1] = "no_root_dir"
vDrType[2] = "removable"
vDrType[3] = "fixed"
vDrType[4] = "remote"
vDrType[5] = "cdrom"
vDrType[6] = "ramdisk"

local sDrives = "ACDEFGHIJKLMNOPQRSTUVWXYZ"

for (local i = 1; i le length(sDrives); i++)
   local sDrive = select(sDrives, i, i)
;sgp provided this:
  win.debug(sDrive ++ ?":\")
   win.debug(sDrive ++ "is : " ++ vDrType[dll.call("GetDriveType|LPCTSTR
ui", sDrive ++ ?":\")] )
endfor




[Non-text portions of this message have been removed]

Reply via email to