1 Reply Latest reply on Jan 4, 2017 12:38 AM by Ronald63

    Cannot unzip using AppleScript

    martine55225436

      Hi, I use Indesign CC 20015, ExtendScript Toolkit and OSX 10.9. I try to use the following code to unzip a file:

       

      try

      {

      app.doScript('do shell script "unzip /Users/admin/Desktop/images/04456_IMG1.zip"', ScriptLanguage.applescriptLanguage);

      }

      catch(e)

      {

          $.writeln (e);

          }

       

      However, I always goes into the catch clause and I get the following error:

       

      IOError: error:  cannot create 04456_IMG1/04456_IMG1.jpg

      checkdir error:  cannot create __MACOSX/04456_IMG1

                       unable to process __MACOSX/04456_IMG1/.

      checkdir error:  cannot create __MACOSX/04456_IMG1

                       unable to process __MACOSX/04456_IMG1/._04456_IMG1.jpg.

       

      I have set the zip file to -rwxrwxrwx. So it shouldn't be a permission problem. When i do "unzip /Users/admin/Desktop/images/04456_IMG1.zip" in the shell then it works.

       

      Help very appreciated.