• 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: Jake Pietrykowski <email@hidden>
  • Date: Tue, 16 Nov 2004 15:15:13 -0600

tell application "Finder"
    set theFolder to (container of file "scripname.scpt") as text
end tell

The result is the full path to the folder. Will this work, or do you need
the name of the script to be dynamic?

Jake Pietrykowski


On 11/16/04 2:43 PM, "Ken Brooks" <email@hidden> 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?
>
> Documentation seems to say that unqualified filenames will be interpreted
> relative to this directory, but I'm not seeing that.  Can someone tell me what
> directory is actually used?
>
> Ken Brooks
>  _______________________________________________
> 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


 _______________________________________________
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: Re: Getting the current directory
  • Previous by thread: Re: Getting the current directory
  • Next by thread: Re: Getting the current directory
  • Index(es):
    • Date
    • Thread