Creating a Password Protected ZIP File using the Command Line Transport
The Execute Command Line Transport can be used to run programs on the computer that the eiConsole and eiPlatform are on. This article includes a sample Interface that uses the command line transport to create a zip file that is password protected. It can also be used as an example of how to have an interface run other external command line applications.
- Download the Sample Interface and unzip it.
- Download and install the 7zip command line tool from http://www.7-zip.org/.
The sample interface contains one Route. That route contains the following:
- Transaction Attribute Processors to create attributes containing the filename of the zip file to create and the password to use for the new zip file.
- An XSLT transform that generates an XML document with the location of the command to run and the command line parameters.
- The Execute Command Line transport which calls out and runs the 7zip program
- Post-Processors that
- Check the result from 7zip to see if it includes the message “Everything is Ok” indicating that it was successful
- If it was successful, delete the file that was added to the zip.