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?
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.
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).
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
Copy link to clipboard
Copied
Maybe @Robert at ID-Tasker who knows everything can solve this
By @creative explorer
Of course.
This is info how to do it on a Mac - just in case:
But as, I think, you are on Windows - can you use external packer - or are you limited to only use what is in Windows?
Copy link to clipboard
Copied
Yep, I`m limited with Windows. š
Copy link to clipboard
Copied
Yep, I`m limited with Windows. š
By @a_sneg
I wouldn't call it a limitation.
Here is an example:
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.
Copy link to clipboard
Copied
Look into the app.packageUCF() function. Though I don't know if that works on network drives.
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: