APM: Method to Read zip files?

Jeff Sumner jeff_sumner at hotmail.com
Mon Jun 18 07:30:02 PDT 2007


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


More information about the Austin mailing list