Unzip files
Is this possible to unzip the file using indesign script
Is this possible to unzip the file using indesign script
Hello,
If you are on MacOS you can use a terminal command :
JS Snippet :
function zip(file){
var mScript = "/~/Desktop/zip.scpt";
var mResult = app.doScript(mScript,ScriptLanguage.applescriptLanguage,file);
return mResult
}
zip.scpt
set myFile to item 1 of arguments
try
set mZip to do shell script "zip -r archive_name.zip " & quoted form of POSIX path of myFile
on error errStr number errorNumber
set mZip to 0
end try
return mZip
see : https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/zip.1.html
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.