• 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
unzip behavior
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

unzip behavior


  • Subject: unzip behavior
  • From: Yvan KOENIG <email@hidden>
  • Date: Thu, 12 Jan 2017 13:13:05 +0100

I was asked to write a piece of code needing the expansion of a zip archive.
I tried :
set theZip to ((path to documents folder as text) & "my Kontainer.zip" as alias)
set quotedPOSIXZip to quoted form of POSIX path of theZip
do shell script "unzip " & quotedPOSIXZip

I got a very long error message beginning with :

error "checkdir error:  cannot create my Kontainer
                 Permission denied
                 unable to process my Kontainer/.
checkdir error:  cannot create my Kontainer
                 Permission denied
                 unable to process my Kontainer/.DS_Store.
checkdir error:  cannot create __MACOSX
                 Permission denied
                 unable to process __MACOSX/.
checkdir error:  cannot create __MACOSX
                 Permission denied
                 unable to process __MACOSX/my Kontainer/.

So I decided to add the definition of the destination folder in the instruction.

set theZip to ((path to documents folder as text) & "my Kontainer.zip" as alias)
set quotedPOSIXZip to quoted form of POSIX path of theZip
set unZippedPath to text 1 thru -5 of (theZip as text)
set quotedPOSIXunZippedPath to quoted form of POSIX path of unZippedPath
do shell script "unzip " & quotedPOSIXZip & " -d" & quotedPOSIXunZippedPath

This time the expansion was done but with a strange - at least for me - behavior.

The created folder "my Kontainer" contain :

my Kontainer
_MACOSX
my Kontainer
Click Me .app
Click Me orig.app
Click Me? copie.app
my Kontainer
2017-01-06T10.57.34.nsf
2017-01-06T11.01.03.nsf
Click Me .app
Click Me orig.app
Click Me? copie.app
double click me old.app
double click me.app
folderNameInside.txt

The three apps in my Kontainer:_MACOSX:my Kontainer are zero byte files which seems to be phantoms of the three apps with the same names in my Kontainer:myKontainer.
The late ones are packages containing a document.wflow file as well as a MacOS:Application Stub item.
The two other applications are scripts saved as applications in flat files.

Is it the normal behavior or am I making something wrong ?

Yvan KOENIG running Sierra 10.12.2 in French (VALLAURIS, France) jeudi 12 janvier 2017 13:10:17



 _______________________________________________
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

  • Follow-Ups:
    • Re: unzip behavior
      • From: Shane Stanley <email@hidden>
  • Prev by Date: Re: Indeed
  • Next by Date: Re: Indeed
  • Previous by thread: Re: Indeed
  • Next by thread: Re: unzip behavior
  • Index(es):
    • Date
    • Thread