This topic contains 5 replies, has 4 voices, and was last updated by Jeff Drumm 9 years, 6 months ago.
ZIP Files
You must be logged in to reply to this topic.
This topic contains 5 replies, has 4 voices, and was last updated by Jeff Drumm 9 years, 6 months ago.
I’m writing an interface to an image repository that wants an image file and an XML file delivered in a single ZIP file via FTP. I’ve got the everything completed natively in Lua, but I’ve not found any functions for working with ZIP files. Is this possible in Iguana? If not does anyone have a recommendation on a good command line program I can invoke to accomplish this?
M.R. McBee
We’ve got built-in functions for bzip2 and gzip (http://wiki.interfaceware.com/577.html), but not “plain old zip”. As for a command-line zip program, I’ve had luck with info-zip in the past. It looks like it’s getting a little old, but it should still work.
If I used GZIP, is there a way to combine multiple files into a single .GZIP file before I FTP it over? I got the sense in reading the documentation it could only compress one file at a time. I’m going to talk to my customer and see if they can support either of those files
My Interface looks like this:
XML file and TIF image are delivered
Reprocess XML to match the destination’s format of a comma delimited record.
Zip the TIF and CSV file together
FTP them to destination.
I realize this gets pretty far outside of some the intended use of Iguana. I’m probably going to try your suggestion and I’ll let you know the results. I think
M.R. McBee
Ryan I built an example and wrote a quick wiki page on it here http://wiki.interfaceware.com/1474.html if you would like to take a look at it. I was not sure the OS you are on so I added some additional links on the page but mine was done on a mac using the info-ZIP it may come installed with the Mac OSX. Either way let me know if this helps at all. Thanks. Jeff
I realize this gets pretty far outside of some the intended use of Iguana. I’m probably going to try your suggestion and I’ll let you know the results. I think
BTW this is exactly why Iguana is so great. The goal is to get data from point A to point B someway that works for both parties. The more flexible the better:)
7-Zip is available in Windows 32 and 64 bit versions and includes a command line interface (7z.exe) that should be usable through Iguana’s io.popen() or os.execute() calls. It still appears to be actively supported, and was most recently updated in March 2013.Jeff Lewis also provides a link to it on his wiki page.
The process flow you describe would be easily adapted to 7-Zip.
Jeff Drumm ◊ VP and COO ◊ HICG, LLC. ◊ http://www.hicgrp.com
You must be logged in to reply to this topic.