<html>
<head>
<style>
P
{
margin:0px;
padding:0px
}
body
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body>
Archive::Zip may be easier, but I use<br>my @args = ("unzip", "-qqt", "$ftp_dir/$zip_file");<br>to test for a valid zip files then<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; my @rc = `unzip -qql $ftp_dir/$zip_file`;<br><br>to list the files, find the one I want into $file_to_unzip<br>and <br>finally<br><br>&nbsp;&nbsp; my $return = `unzip -qqjo $ftp_dir/$zip_file $file_to_unzip -d $ftp_dir\n`;<br><br>to unzip <br><br>qq means a quiet output<br>t means test<br>l means list<br>j means Junk any directory structure they may be trying to do<br>0 means overwrite existing files. <br><br>Jeff Sumner<br><br><br><br>&gt; Date: Sat, 16 Jun 2007 00:36:56 -0500<br>&gt; To: austin@pm.org<br>&gt; From: bpohl@bpohl.com<br>&gt; Subject: Re: APM: Method to Read zip files?<br>&gt; <br>&gt; I had to do something like this for some automation I was doing for a <br>&gt; job.  We were receiving JPG pictures that were zipped together by <br>&gt; day, and then those zips were zipped together by week.  There wasn't <br>&gt; enough space on the machine to unzip everything so I wrote a module <br>&gt; using Archive::Zip to list the contents of a zip and then be able to <br>&gt; pull files from it one at a time.  The biggest drawback was the speed <br>&gt; because to pull a file from the middle or end it had to traverse the <br>&gt; whole file to find what it was looking for.<br>&gt; <br>&gt; I had to leave the module with the company I wrote it for.  If you <br>&gt; aren't after speed you should be able to get what you want out of <br>&gt; Archive::Zip.<br>&gt; <br>&gt; -Bion<br>&gt; <br>&gt; <br>&gt; <br>&gt; &gt;<br>&gt; &gt;Message: 1<br>&gt; &gt;Date: Sat, 9 Jun 2007 11:02:23 -0500<br>&gt; &gt;From: David Bluestein II &lt;dbii@interaction.net&gt;<br>&gt; &gt;Subject: APM: Method to Read zip files?<br>&gt; &gt;To: Austin Perl Mongers &lt;austin@pm.org&gt;<br>&gt; &gt;Message-ID: &lt;e3199f211d21a33c1d7fb386721dbb63@interaction.net&gt;<br>&gt; &gt;Content-Type: text/plain; charset=US-ASCII; format=flowed<br>&gt; &gt;<br>&gt; &gt;I have a pile of zipped files I need to parse on windows machine.<br>&gt; &gt;Probably 100 files total. I saw there is an Archive::Zip I could<br>&gt; &gt;probably use to unzip into memory, as I don't want to have to unzip<br>&gt; &gt;into the file system, but has anyone used something like that?<br>&gt; &gt;Basically a way to look into a zip file, find the constituent files,<br>&gt; &gt;then parse them?<br>&gt; &gt;<br>&gt; &gt;Thanks-<br>&gt; &gt;<br>&gt; &gt;David<br>&gt; &gt;<br>&gt; &gt;-----------------------------------------------------------------------<br>&gt; &gt;David H. Bluestein II<br>&gt; &gt;President &amp; Lead Developer         dbii@interaction.net<br>&gt; &gt;ii, inc.                                                 <br>&gt; &gt;http://www.interaction.net<br>&gt; &gt;      -- Specializing in Interactive, Database Driven Web Applications --<br>&gt; &gt;<br>&gt; <br>&gt; -- <br>&gt; --<br>&gt;      ________________<br>&gt;     /    ________    |   Bion Pohl<br>&gt;    / /| |       /    |        Relational Consulting<br>&gt;   / /_|_|______/  /| |        bpohl@bpohl.com<br>&gt;   |  __________  / | |<br>&gt;   | | | |      | | | |        Lord Gordon Kepler in the S.C.A.<br>&gt;   | | | |      | | | |<br>&gt;   | | | |______|_|_| |  <br>&gt;   | | /  __________  |<br>&gt;   | |/  /      | | / /   Using Macintosh since 1985,<br>&gt;   |    /_______| |/ /                        and I don't do Windoze.<br>&gt;   |________________/<br>&gt; _______________________________________________<br>&gt; Austin mailing list<br>&gt; Austin@pm.org<br>&gt; http://mail.pm.org/mailman/listinfo/austin<br><br /><hr />Make every IM count. Download Windows Live Messenger and join the i’m Initiative now. It’s free.  <a href='http://im.live.com/messenger/im/home/?source=TAGWL_June07' target='_new'>Make it count!</a></body>
</html>