• 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: Accessing the parent directory...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Accessing the parent directory...


  • Subject: Re: Accessing the parent directory...
  • From: Steven Angier <email@hidden>
  • Date: Wed, 14 Nov 2001 08:31:18 +1100
  • Organization: Macscript.com

The following script demonstrates how relative paths work in AppleScript:

--establish a root folder (let's use Preferences here)
set theRootFolder to (path to preferences) as text

--define a relative path (we'll use Extensions here)
--the leading colon will cause AppleScript to go up a level
set theRelativePath to ":Extensions:"

--now concatenate the strings and coerce to an alias
set theAbsolutePath to (theRootFolder & theRelativePath) as alias

--> alias "Macintosh HD:System Folder:Extensions:"


Hope this helps gets you started.

Steven Angier
Macscript.com



kannan balu wrote:

> I need to clear a simply doubt in MAC. I need to access the parent directory
> from an AppleScript application.
>
> But I need to access through relative path but not with absolute path.


References: 
 >Accessing the parent directory... (From: "kannan balu" <email@hidden>)

  • Prev by Date: Re: Scripting Palm Desktop (was Re: Saving an attachment from)
  • Next by Date: Re: Fast Loading & updating of Handler Libraries
  • Previous by thread: Re: Accessing the parent directory...
  • Next by thread: Re: Accessing the parent directory...
  • Index(es):
    • Date
    • Thread