<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> 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> 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>> Date: Sat, 16 Jun 2007 00:36:56 -0500<br>> To: austin@pm.org<br>> From: bpohl@bpohl.com<br>> Subject: Re: APM: Method to Read zip files?<br>> <br>> I had to do something like this for some automation I was doing for a <br>> job. We were receiving JPG pictures that were zipped together by <br>> day, and then those zips were zipped together by week. There wasn't <br>> enough space on the machine to unzip everything so I wrote a module <br>> using Archive::Zip to list the contents of a zip and then be able to <br>> pull files from it one at a time. The biggest drawback was the speed <br>> because to pull a file from the middle or end it had to traverse the <br>> whole file to find what it was looking for.<br>> <br>> I had to leave the module with the company I wrote it for. If you <br>> aren't after speed you should be able to get what you want out of <br>> Archive::Zip.<br>> <br>> -Bion<br>> <br>> <br>> <br>> ><br>> >Message: 1<br>> >Date: Sat, 9 Jun 2007 11:02:23 -0500<br>> >From: David Bluestein II <dbii@interaction.net><br>> >Subject: APM: Method to Read zip files?<br>> >To: Austin Perl Mongers <austin@pm.org><br>> >Message-ID: <e3199f211d21a33c1d7fb386721dbb63@interaction.net><br>> >Content-Type: text/plain; charset=US-ASCII; format=flowed<br>> ><br>> >I have a pile of zipped files I need to parse on windows machine.<br>> >Probably 100 files total. I saw there is an Archive::Zip I could<br>> >probably use to unzip into memory, as I don't want to have to unzip<br>> >into the file system, but has anyone used something like that?<br>> >Basically a way to look into a zip file, find the constituent files,<br>> >then parse them?<br>> ><br>> >Thanks-<br>> ><br>> >David<br>> ><br>> >-----------------------------------------------------------------------<br>> >David H. Bluestein II<br>> >President & Lead Developer dbii@interaction.net<br>> >ii, inc. <br>> >http://www.interaction.net<br>> > -- Specializing in Interactive, Database Driven Web Applications --<br>> ><br>> <br>> -- <br>> --<br>> ________________<br>> / ________ | Bion Pohl<br>> / /| | / |        Relational Consulting<br>> / /_|_|______/ /| |        bpohl@bpohl.com<br>> | __________ / | |<br>> | | | | | | | |        Lord Gordon Kepler in the S.C.A.<br>> | | | | | | | |<br>> | | | |______|_|_| | <br>> | | / __________ |<br>> | |/ / | | / / Using Macintosh since 1985,<br>> | /_______| |/ / and I don't do Windoze.<br>> |________________/<br>> _______________________________________________<br>> Austin mailing list<br>> Austin@pm.org<br>> 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>