• 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: (no subject)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: (no subject)


  • Subject: Re: (no subject)
  • From: Christopher Nebel <email@hidden>
  • Date: Thu, 17 Dec 2009 12:50:34 -0800

You're still using a relative path, which is a maintenance risk, since there's no guarantee what the Finder's working directory will be.  Translating between HFS and POSIX paths is *not* simply a matter of changing the slashes to colons (or vice versa) -- use "POSIX path of" and "POSIX file" to translate between the two.  Short version in your case: lose the ":Volumes:" at the beginning of both paths.  Alternatively, use Finder's long-hand references:

set a to file "2009-Q4" of folder "2009 Daily BUs" of ... disk "Server"

...or even mix the two:

set a to file "Applications:Retrospect 6.0:StorageSets:2009 Daily BUs:2009-Q4" of disk "Server"

As for why it re-wrote your "POSIX file ..." references, you must be using Tiger or earlier -- it has to do with how AppleScript handles constant expressions (the technique is called "constant folding"), and Leopard doesn't try to do that particular case.


--Chris Nebel
AppleScript Engineering

On Dec 17, 2009, at 7:20 AM, Curt Schultz wrote:

Do not post admin requests to the list. They will be ignored. AppleScript-Users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: Archives: http://lists.apple.com/archives/applescript-users This email sent to email@hidden
References: 
 >(no subject) (From: Curt Schultz <email@hidden>)
 >Re: (no subject) (From: Paul Skinner <email@hidden>)
 >Re: (no subject) (From: Curt Schultz <email@hidden>)

  • Prev by Date: Re: Excel 2004 issue
  • Next by Date: Re: Plug-ins
  • Previous by thread: Re: (no subject)
  • Next by thread: Re: Re: Quark Bounds Not Working Like it did
  • Index(es):
    • Date
    • Thread