I’m trying to get a list of every disk connected to a computer, EXCLUDING the boot disk, and excluding network volumes.
I can do this:
**tell** *application* "System Events"
**set** DriveList **to** **the** name **of** **every** *disk*
**end** **tell**
But how can I determine which volumes are which KINDs of volumes.
I’m trying to dig deeper but I’m just getting further and further away from what I’m looking for.
If I do “set DriveList to the alias of every disk”, I get… what appears to be a list of paths to every item at the root level of every disk on the system.
If I can’t easily exclude network volumes, I at least have to exclude the computer’s boot disk from this list.
I was able to get a little bit closer just now by doing this:
**tell** *application* "Finder"
**set** VolumeFolder **to** *POSIX file* "/Volumes" **as** *alias*
**set** DriveList **to** name **of** **every** *item* **of** VolumeFolder **whose** kind **is** **not** "Alias"
**end** **tell**
That at least excludes the startup disk.
Is this as close as I’m going to get?
Is there a better overall approach to this?
This script is going to let the user pick a disk, and then its going to be creating files and folders, reading and writing to and from the chosen disk.
Also this forum software is terrible.