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

Re: Get current working directory


  • Subject: Re: Get current working directory
  • From: Paul Berkowitz <email@hidden>
  • Date: Mon, 03 Oct 2005 12:56:57 -0700
  • Thread-topic: Get current working directory

On 10/3/05 12:38 PM, "Mark J. Reed" <email@hidden> wrote:

> On 10/3/05, Thomas Vatter <email@hidden> wrote:
>> Nearly - [path to me] returns not only the path but also the name of the
>> script, for instance /.../this_script.app.
>> I'm now trying to cut off the name of the script.
>
> tell application "Finder" to get folder of (path to me)

tell application "Finder" to (folder of ((path to me)) as Unicode text

or you'll get the awkward 'folder this of folder that of folder theOther of
folder "username" of folder "Users" of disk "blah"' syntax.


You can also parse ((path to me)) as Unicode text
 using {":"} as text item delimiters to get text items 1 thru -2, if you
prefer, and string it up again.

--
Paul Berkowitz


 _______________________________________________
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: 
 >Re: Get current working directory (From: "Mark J. Reed" <email@hidden>)

  • Prev by Date: Re: I wish Apple would follow its own advice
  • Next by Date: Re: I wish Apple would follow its own advice
  • Previous by thread: Re: Get current working directory
  • Next by thread: Re: Get current working directory
  • Index(es):
    • Date
    • Thread