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

Re: Current working directory...


  • Subject: Re: Current working directory...
  • From: Luther Fuller <email@hidden>
  • Date: Fri, 2 Jun 2006 17:28:05 -0500

On Jun 2, 2006, at 5:08 PM, Charles E. Heizer wrote:
Hello,
How can I get the directory of the script I'm running? I tried "do shell script pwd" but it returns "/".

Start with this ...

	tell application "Finder" to set selfRef to (path to me) as alias

To get the directory, use ...

tell application "Finder" to set myLoc to (container of selfRef) as alias

_______________________________________________
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: 
 >Current working directory... (From: "Charles E. Heizer" <email@hidden>)

  • Prev by Date: Re: Getting the path to root
  • Next by Date: AppleScript release notes
  • Previous by thread: Current working directory...
  • Next by thread: AppleScript release notes
  • Index(es):
    • Date
    • Thread