Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting the path to root




On Jun 2, 2006, at 11:26 AM, Serge Ségu wrote:


Le 2 juin 2006, à 19:32, Roger Howard a écrit :

i was wonthering how to get the path to root
I can get the path to desktop the following way:
set mypath to path to desktop

But how can i set it to root?

btw, what is the meaning of root in AppleScript ? and root has it a significance for AppleScript ?

I didn't ask the question, even though you quoted the message to make it look like I did... however, I would assume root is root - it means something very clear to me, AppleScript or not.


tell application "Finder"
	desktop's folder's folder's folder's folder	
end tell

That's not a reliable method to find root, as the current user's home folder may be relocated and not have this same relative path to root.


If you want an alias to root:
set RootAlias to "/" as POSIX file as aliasSerge

like: path to startup disk

I suppose that should give the same results in most, if not all, situations. But since the user asked about root, and not startup disk, I thought I would take the most direct approach... "/" is always root. I'm not sure startup disk always is the same as root, though to be honest I can't imagine at the moment any situations where it wouldn't..


Cheers,

Roger _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/applescript-users/email@hidden

This email sent to email@hidden
References: 
 >Getting the path to root (From: "Federico Tessmann" <email@hidden>)
 >Re: Getting the path to root (From: Roger Howard <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.