Page 1 of 1

Recognise a USB stick

Posted: Tue Feb 21, 2012 5:09 am
by Howlernator
Heya Folks,

Anyone got a command / function lying around that will find a USB stick on Mac/Win and return a path to it?

Warm regards,

A.

Re: Recognise a USB stick

Posted: Mon Mar 26, 2012 1:05 pm
by hliljegren
I guess that really depends on what kind of "USB-stick" you imply, and what "find" means. On the Mac you can use the system_profiler command via the shell to probe the USB-chain:

Code: Select all

put shell("system_profiler SPUSBDataType")
:-HÃ¥kan

Re: Recognise a USB stick

Posted: Mon Mar 26, 2012 5:26 pm
by jacque
You could try "the volumes". It won't give you info about the type of device but it should list the name of the USB drive.