UPDATE: SOLVED,, thank you ww for your answer. It was correct, I striped the path form the file and it works correctly now!

UPDATE: more info: example of unzip on another linux box.
Also, if I use zip from linux, I can unzip the file in windows
root@:/var/www/pcap# unzip -t wpb.eth1.03_09_12_14-3104.pcap.zip Archive: wpb.eth1.03_09_12_14-3104.pcap.zip testing: /root/pcap/wpb.eth1.03_09_12_14-3104.pcap OK No errors detected in compressed data of wpb.eth1.03_09_12_14-3104.pcap.zip. root@:/var/www/pcap#

Windows error: "The Compressed (zipped) Folder 'c:\<file path>' is invalid"

Hello All,

I am using Archize::Zip in Ubuntu server (Linux Snifferone 3.0.0-16-server #28-Ubuntu SMP Fri Jan 27 18:03:45 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux), Archive::Zip is up to date (1.30).

It seems to compress just fine, and I can unzip them on another unix box using unzip utility. But when transfered to a windows 7 system, I am unable to unzip using the native windows extract. I believe I am missing a library on the linux, but I am at a loss here.

Thanks, in advance!

Here is my code snip

sub zipfiles { my $path = shift; my $tree_hash_ref = shift; foreach my $file ( keys %$tree_hash_ref ) { $file = "$path$file"; print "DEBUG: zipping $file\n"; my $zip = Archive::Zip->new(); my $file_member = $zip->addFile("$file"); my $fh = IO::File->new( "$file.zip", 'w' ); $fh->binmode; unless ( $zip->writeToFileHandle($fh) == 0 ) { $fh->flush; $fh->close; } $fh->close; print "DEBUG: unlinking $file\n"; unlink($file); } }


In reply to SOLVED: Archive::Zip unable to unzip with native windows 7 by gman

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.