I created a ZIP file using Perl v5.8.6 Build 811 and Archive::Zip that
was included in the ActiveState build on a Windows 2003 server. When I
open the file on the server the OS shows no files in the archive. But if
I copy the file to my client running XP SP1 and Winzip 9.0 SR-1 the open
and Winzip displays the files in the archive. Can someone explain why
the Windows 2003 archive processing code does not read the file
properly? Can this be corrected by using a different Archive::Zip?
------------------------------------------------------------------------
----
Windows own handling of compressed files can have problems with
directory
entries in zip files (though WinZip handles them fine). If that's
what you're up against then a solution is to use a filter:
$zip->addTree( $root, $dest, sub { -f } );
If you're facing a different issue could you provide (preferably as a
plain
text post) a *minimal* but complete script that demonstrates the
problem.
Cheers,
Rob
[Bullock, Howard A.]
-------------------------------------------------------
use strict;
use Archive::Zip qw( :ERROR_CODES :CONSTANTS );
my $zip = Archive::Zip->new();
my $member1 = $zip->addFile( "C:/data/scripts/junk1.pl" );
my $member2 = $zip->addFile( "C:/data/scripts/junk2.pl" );
my $result = $zip->overwriteAs("C:/data/scripts/junk.zip");
if ($result == 0){
print "Wrote ZIP file: junk.zip";
}
else {
print "Error Writing ZIP file: junk.zip";
}
This script was used to create the ZIP file on an XP client then copied
to a Windows 2003 server that does not have winzip installed. The icon
used by the OS is a folder with a zipper. When I double-click on the
file a window opens but no files are shown.
_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs