• 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: Copying files into packages
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Copying files into packages


  • Subject: Re: Copying files into packages
  • From: Philip Aker <email@hidden>
  • Date: Tue, 24 Sep 2002 20:23:39 -0700 (PDT)
  • Composer: Philip Aker

On Tue, 24 Sep 2002, garrett wrote:

> Since the finder sees packages as folders, can I copy a file into a package?
>
> set theSource to "HD:file.jpg"
> set the Dest to "HD:Apps:Application.app:Content:Resources:"
>
> tell application "Finder"
> copy theSource to theDest
> end tell
>
> I get an error:
>
> -1728: Can't get the application file "Application.app" of folder "Apps" of
> startup disk.
>
> any thoughts?

1. Well, the path should be
"HD:Applications:SomeApp.app:Contents:Resources:"

2. Turn it into a POSIX path (BTW it's "Contents" (plural)) and use:

do shell script "ditto -rsrc " & original_path & " " & copy_path


Philip Aker
http://www.aker.ca
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

References: 
 >Copying files into packages (From: garrett <email@hidden>)

  • Prev by Date: Copying files into packages
  • Next by Date: Re: Copying files into packages
  • Previous by thread: Copying files into packages
  • Next by thread: Re: Copying files into packages
  • Index(es):
    • Date
    • Thread