PDA

View Full Version : AppleScript Help




Johnny Vegas
May 16, 2012, 11:23 AM
I'm trying to write a script that will open a specific folder. The only problem is that it needs to be run on multiple machines with different Hard Drive names. Here is a sample of the script that will work on my machine.

tell application "Finder"
activate
open folder "HDD:Volumes:USERData:Users:Staff:Name"
end tell

Is there anyway to change "HDD" to whatever the current users Hard Drive is named?

Thanks for the help.

~JV



kryten2
May 16, 2012, 12:18 PM
This will give you the startup disk eg Macintosh HD as alias

path to startup disk
--or as text
(path to startup disk as text) & "Volumes:USERData:Users:Staff:Name"