• 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 current directory
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting the current directory


  • Subject: Re: Getting the current directory
  • From: Joseph Weaks <email@hidden>
  • Date: Tue, 16 Nov 2004 15:17:24 -0600

On Nov 16, 2004, at 2:43 PM, Ken Brooks wrote:
I would like to get a file reference (or alias) to the directory containing the script that is running. Is there a way to do this?

How is the script going to be run? Using

path to me

will return the alias for either the script itself or the app that is running the script. Depends on how it is run. To get its container, you can use:

tell application "Finder" to get container of (path to me) as string

Joe

_______________________________________________
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 current directory (From: Ken Brooks <email@hidden>)

  • Prev by Date: Re: Getting the current directory
  • Next by Date: Error -43 when attempting to write to file
  • Previous by thread: Re: Getting the current directory
  • Next by thread: Error -43 when attempting to write to file
  • Index(es):
    • Date
    • Thread