Re: Get current working directory
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