Feb 02, '05 09:06:00AM • Contributed by: jason mark
Here's the script:
set thePath to ((get path to startup disk) & "Users:" & ¬
(do shell script "echo $USER") & ¬
":Library:Favorites:ALIAS to Server") as string
tell application "Finder"
open alias thePath
activate
end tell
Note that this script also shows a simple way to open files in a given user's home directory. Everything I had found online (including some hints here) pointed out that there's not easy way to do this -- but by using a shell script to get the $USER setting, it's relatively simple from there. To use the generic version, just replace ":Library:Favorites:ALIAS to Server" in the first line with the path to the folder you need to reach.
[robg adds: I haven't tested this one...]
