Re: Creating Zip file via Create Archive
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