Clovertech
› Clovertech Forums › Read Only Archives › Cloverleaf › Cloverleaf › Using pkzip or winzip from the engine
We are creating 270 files from SQL data. Before FTP’ing the file to eMedNY I need to Zip the output file. Is there a way to invoke WINZIP or PKZIP from inside the engine as part of the translate process? Thanks for your replies.
You might try doing a bit of tcl in the xlate using the tcl “system” command:
system pkzipc -add zipFileName sourceFiles
Your mileage may vary depending on your version of PKZIP.
You could also do this with a Java proc using the java.util.zip classes.
We do this for unzipping messages that we receive. It also has the advantage that you don’t have to write out any temporary files to disk.
I’ve attached a copy of our code.