• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Getting the path to root
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting the path to root


  • Subject: Re: Getting the path to root
  • From: Roger Howard <email@hidden>
  • Date: Fri, 2 Jun 2006 11:28:17 -0700


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:
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>)

  • Prev by Date: Re: Getting the path to root
  • Next by Date: Re: Getting the path to root
  • Previous by thread: Re: Getting the path to root
  • Next by thread: Re: Getting the path to root
  • Index(es):
    • Date
    • Thread