• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Creating a ZIP file in InDesign

New Here ,
Jul 18, 2024 Jul 18, 2024

Copy link to clipboard

Copied

Good afternoon.
I need your help in finalizing the save script.
There is a script that saves a folder with fonts, IDML and INDD documents to a separate folder using doc.package For Print.
I need to make a ZIP archive from the folder it saves to.

 

The main problem is that the working folders and files are not stored on the local machine, but on network storage.

The folder is created new each time using a script.
There is no way to assign a specific folder on the NAS to the app.packageUCF method, as it will cause a lot of confusion in the files (the script is used by several people for a large number of files).

 

Maybe someone can tell me how to specify the path to the network folder to the app.packageUCF method?

TOPICS
How to , Import and export , Scripting , Sync and storage

Views

861

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 18, 2024 Jul 18, 2024

Copy link to clipboard

Copied

@a_sneg Have you tried just using the 'Package' in InDesign. if you go to File - Package, it should package all your files for you...especially if your fonts and images/artwork are linked in different folders and servers. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 18, 2024 Jul 18, 2024

Copy link to clipboard

Copied

Yes, but Package creates a folder. And it's implemented in my script. The task is to make a ZIP archive from this folder, which will be uploaded to the cloud (self-designed cloud client can't upload folders, only files, there is no way to rewrite it, so I have an idea to automate the export process from InDesign so that it exports ZIP archive at once).

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 18, 2024 Jul 18, 2024

Copy link to clipboard

Copied

@a_sneg dang....For me, I guess once you package the file, you can open the folder and zip them into one zip...problem with that then, you have all the fonts, and linked files in one big zip floating around

Maybe @Robert at ID-Tasker who knows everything can solve this

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 19, 2024 Jul 19, 2024

Copy link to clipboard

Copied

quote

Maybe @Robert at ID-Tasker who knows everything can solve this


By @creative explorer

 

Of course. 

 

@a_sneg

 

This is info how to do it on a Mac - just in case:

https://community.adobe.com/t5/indesign-discussions/zip-package-from-indesign-by-script/m-p/3565031#...

 

But as, I think, you are on Windows - can you use external packer - or are you limited to only use what is in Windows? 

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 21, 2024 Jul 21, 2024

Copy link to clipboard

Copied

Yep, I`m limited with Windows. 😞

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 22, 2024 Jul 22, 2024

Copy link to clipboard

Copied

LATEST
quote

Yep, I`m limited with Windows. 😞

 

By @a_sneg

 

I wouldn't call it a limitation.

 

Here is an example:

https://community.adobe.com/t5/indesign-discussions/call-exe-file-from-indesign-using-java-script/m-...

 

var myFile = File("/c/Program Files/Microsoft Office/Visio11/Visio.exe");
myFile.execute(); 

 

Then, you have - at least - three options:

1) incorporate your packer with params into the above string,

2) call some universal BAT file located in the folder(s),

3) dynamically create BAT file, store it in the folder and then call it.

 

So if you go for option 1) - it could be something like this:

 

' “C:\Program Files\7-Zip\7z.exe” a -tzip “C:\target-folder\Folder 1.zip” “C:\blog\zip_example\Folder 1*” '

 

or however you would have to "encode" this string into correct JS string - I'm not JS guy.

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 19, 2024 Jul 19, 2024

Copy link to clipboard

Copied

Look into the app.packageUCF() function. Though I don't know if that works on network drives.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 19, 2024 Jul 19, 2024

Copy link to clipboard

Copied

Ha. Not related to this discussion, but I wasn't aware of this command. As I looked it up (in AppleScript), I also discovered the unpackage UCF command. After some testing, it appears that it can unpackage IDML files. Which eliminates the need for the zip/unzip switcheroo on Mac. I'll update that discussion, too:

https://community.adobe.com/t5/indesign-discussions/idml-file-type-doesn-t-unzip-using-mac-archive-u...

 

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines