Finding a specific Windows volume

FlexibleLearning at aol.com FlexibleLearning at aol.com
Tue Feb 5 09:39:40 EST 2008


Try modifying this, Richard, passing each line of "the volumes" as  pDiskLette
r in a repeat loop...

function GetVolumeSN  pDiskLetter
local volumeSerialNumber
--| Supports both "C",  "C:" and "C:\" styles
put char 1 of pDiskLetter & ":" into  pDisk
set the hideConsoleWindows to true
put shell("dir "  & pDisk) into tDirData
get matchText(tDirData,"Volume Serial  Number is (.*)\n",volumeSerialNumber)
if it is true then
    # add a check for the DCIM directory if you wish
    return volumeSerialNumber
else return "No  Disk" # Unmounted volume
end GetVolumeSN

/H


>I'm looking for suggestions on how to find out if a  specific USB  
>camcorder is attached to a users computer (Windows  only), and if it  
>is, which volume identifies it. If the camcorder  is attached, there  
>will be a specific directory on it which I can  use to help identify it.






   



More information about the use-livecode mailing list