v13 thought - find USB flash sticks

Charles Dye

Super Moderator
Staff member
May 20, 2008
3,610
46
Albuquerque, NM
prospero.unm.edu
#1
It'd be nice to have some way of finding/enumerating USB flash sticks, as opposed to just removable drives. Perhaps a new return value from @DRIVETYPEEX[], and/or an internal variable containing drive letter(s) -- %_USBSTICKS, %_USBKEYS, or whatever.
 
#2
| It'd be nice to have some way of finding/enumerating USB flash
| sticks, as opposed to just removable drives. Perhaps a new return
| value from @DRIVETYPEEX[], and/or an internal variable containing
| drive letter(s) -- %_USBSTICKS, %_USBKEYS, or whatever.

How would you distinguish them from external hard drives and other
devices, e.g., MagicJack, plugged into USB ports? In fact, why is the method
of connection for removable drives significant (other than possibly access
times)? IMHO all that's siginifcant is whether they are read-only or
read-write drives, and the type of file system (emulated for most solid
state devices).
--
Steve
 

samintz

Scott Mintz
May 20, 2008
1,288
11
Solon, OH, USA
#3
There is also an issue with mapping a USB drive to a junction. In which
case it shows up as a directory instead of as a drive letter.

-Scott

Steve F$BaC(Bi$BaO(B <> wrote on 08/31/2010 05:16:40 PM:


> | It'd be nice to have some way of finding/enumerating USB flash
> | sticks, as opposed to just removable drives. Perhaps a new return
> | value from @DRIVETYPEEX[], and/or an internal variable containing
> | drive letter(s) -- %_USBSTICKS, %_USBKEYS, or whatever.
>
> How would you distinguish them from external hard drives and other
> devices, e.g., MagicJack, plugged into USB ports? In fact, why is the
method

> of connection for removable drives significant (other than possibly
access

> times)? IMHO all that's siginifcant is whether they are read-only or
> read-write drives, and the type of file system (emulated for most solid
> state devices).
> --
> Steve
>
>
>
>
 

Charles Dye

Super Moderator
Staff member
May 20, 2008
3,610
46
Albuquerque, NM
prospero.unm.edu
#4
How would you distinguish them from external hard drives and other devices, e.g., MagicJack, plugged into USB ports?
Hard drives are easy; they return "fixed disk". The trick would be distinguishing them from other removable-media USB drives, e.g. USB floppies and ZIP drives. I don't have any elegant ideas; maybe keep a short list of media sizes (1.44, 2.88, 100, 250, 750) and assume anything that doesn't match is a stick. (MagicJack? Isn't that some kind of telephony device?)

In fact, why is the method of connection for removable drives significant (other than possibly access times)? IMHO all that's siginifcant is whether they are read-only or read-write drives, and the type of file system (emulated for most solid state devices).
My immediate prompt was a script to automate updating WinPE boot sticks; the drive letters tend to change often as I swap sticks, repartition, etc. But I can think of other scenarios where it would be nice to automatically find a user's flash stick instead of asking for a drive letter.