Re: unzip behavior
Re: unzip behavior
- Subject: Re: unzip behavior
- From: Yvan KOENIG <email@hidden>
- Date: Thu, 12 Jan 2017 14:38:29 +0100
Le 12 janv. 2017 à 13:35, Shane Stanley < email@hidden> a écrit :
On 12 Jan 2017, at 11:13 pm, Yvan KOENIG < email@hidden> wrote: Is it the normal behavior or am I making something wrong ?
I don't know if it's normal for the zip command, but what you're seeing is a failure to handle resource files correctly. IMO you're better off using the ditto command, something like: do shell script ("ditto -xk " and quoted form of "/path/to/Name.zip" & space & quoted form of "/path/to/Name") -- Shane Stanley < email@hidden>
Thanks Shane
I never took care to the fact that ditto is able to expand an archive :-(
I edited the instruction a bit so that the archive and expanded folder are in the same folder.
set theZip to ((path to documents folder as text) & "myFolder:my Kontainer.zip" as alias) tell application "System Events" set archiveContainer to path of container of theZip end tell set quotedPOSIXZip to quoted form of POSIX path of theZip set quotedPOSIXarchiveContainer to quoted form of POSIX path of archiveContainer
do shell script ("ditto -xk " & quotedPOSIXZip & space & quotedPOSIXarchiveContainer)
Yvan KOENIG running Sierra 10.12.2 in French (VALLAURIS, France) jeudi 12 janvier 2017 14:37:48
|
_______________________________________________
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