• 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: duplicate command
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: duplicate command


  • Subject: Re: duplicate command
  • From: Luther Fuller <email@hidden>
  • Date: Fri, 12 Apr 2013 15:05:35 -0500

On Apr 12, 2013, at 2:11 PM, Phil wrote:

I can certainly see problems with this one:

"Macintosh HD:"
set targetPath to quoted form of POSIX path of result
You've only got to rename your HD, or boot into another bootable disk and that script won't work anymore. The revision suggested wouldn't have that problem.

I have found that errors can be avoided by getting an alias first, then

set targetPath to quoted form of POSIX path of itemAlias

The script, above, would be safer using this …

(((path to startup disk) as text) & "Users:Shared:") as alias
set targetPath to quoted form of POSIX path of the result

for example.

I use 'result' often without any problems, but my habit of
always using aliases seems to keep me out of trouble.


 _______________________________________________
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: 
 >Re: duplicate command (From: Phil <email@hidden>)

  • Prev by Date: Re: duplicate command
  • Next by Date: Re: duplicate command
  • Previous by thread: Re: duplicate command
  • Next by thread: Re: duplicate command
  • Index(es):
    • Date
    • Thread