• 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: Creating Zip file via Create Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Creating Zip file via Create Archive


  • Subject: Re: Creating Zip file via Create Archive
  • From: Philip Aker <email@hidden>
  • Date: Mon, 23 Feb 2009 14:22:19 -0800

On 2009-02-23, at 13:38:30, Rosemary Cantrell wrote:

2) If AS, can you tell me what the proper way is to tell it create archive like it does when you right click on a folder and choose create archive?  

This is done with the ditto shell tool <x-man-page://ditto>.  Below is a script which shows the basic usage. Not illustrated is the fact that you can supply multiple input files to 'ditto' and they will all be compressed and merged into the destination.

set fold to (choose folder)
set src to quoted form of (POSIX path of fold)
set dest to (do shell script "dirname " & src) & "/" & (do shell script "basename " & src) & ".zip"
do shell script "ditto -ck " & src & space & quoted form of dest


Philip Aker
echo email@hidden@nl | tr a-z@. p-za-o.@

Democracy: Two wolves and a sheep voting on lunch.

 _______________________________________________
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: 
 >Creating Zip file via Create Archive (From: Rosemary Cantrell <email@hidden>)

  • Prev by Date: Re: Creating Zip file via Create Archive
  • Next by Date: Re: Creating Zip file via Create Archive
  • Previous by thread: Re: Creating Zip file via Create Archive
  • Next by thread: email@hidden
  • Index(es):
    • Date
    • Thread