Omnis Studio ZIP functionality

404 Views Asked by At

I'm currently programming with Omnis Studio 8.x and I need your help.

I know that Omnis Studio has a specific command to compress/extract to/from its internal format but I can't find any easy method to support .zip files.

Is there an external or something better than a command-line script to manage .zip files?

Thank you for your help!

2

There are 2 best solutions below

0
Paul Mulroney On BEST ANSWER

You can also look to the code examples that ship with Omnis Studio - the Java example shows how you can use java classes to work with zip files including zipping, unzipping and adding to an archive.

You could just take the object and paste it into your library.

0
Alex Clay On

Omnis doesn't natively support zipping and un-zipping files. You'll need to call an external utility for this.

macOS

Use $root.$runapplescript to call zip and unzip via a shell command.

Windows

On Windows, you can use Call DLL or Launch program to access external programs. The challenge with Windows is there is no consistent built-in tool for zipping and unzipping files. If you deploy to a current version of Windows 10 with PowerShell 5.1 or better, try Compress-Archive and Expand-Archive in the Microsoft.PowerShell.Archive cmdlets.

For a wider range of support, deploy 7-zip which handles .zip files.