Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Johnny Vegas

macrumors member
Original poster
Jul 7, 2011
65
124
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

macrumors 65816
Mar 17, 2012
1,114
99
Belgium
This will give you the startup disk eg Macintosh HD as alias

Code:
path to startup disk
--or as text
(path to startup disk as text) & "Volumes:USERData:Users:Staff:Name"
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.