Skip to main content
gabrielg28279016
Participating Frequently
January 7, 2019
Answered

Unzip file in ExtendScript

  • January 7, 2019
  • 1 reply
  • 4103 views

How to unzip file in InDesign ExtendScript? I tried to use jszip (a JavaScript lib) but I got some compile errors. I need to unzip a zip file and read all documents.

This topic has been closed for replies.
Correct answer Manan Joshi

Try the following api

app.unpackageUCF("path to zip","destination folder")

Works for me for a simple zip created on a MAC, not sure if it would be able to do it for zip's created using some third party softwares using different compression algorithms.

-Manan

1 reply

Manan JoshiCommunity ExpertCorrect answer
Community Expert
January 7, 2019

Try the following api

app.unpackageUCF("path to zip","destination folder")

Works for me for a simple zip created on a MAC, not sure if it would be able to do it for zip's created using some third party softwares using different compression algorithms.

-Manan

-Manan
Peter Kahrel
Community Expert
Community Expert
January 7, 2019

The parameters for unpackageUCF are a file object and a folder object, not strings.

P.

Community Expert
January 7, 2019

Hi Peter Kahrel,

I did test the code on CC2014 with strings and it did work fine, anyhow using a file and folder object would not harm

-Manan

-Manan