Name of Startup Disk

Hi there,

Just wondering what is he correct way to get the name of the startup disk using applescript. I am using the following…

set volname to path to startup disk as string

The name of my startup disk is “Untitled 2”

The above statement is returning “Untitled 2:”

How do I get it to return the name of the startup disk without the “:” appended?

This works for me.

tell application "Finder" to set volname to name of startup disk

– Rob

Or ignore the offending char:

set volname to text 1 thru -2 of (path to startup disk as string)