Thanks monks.zip file is getting created but with no data all..i dont see any .lib files in there,there still seems to be a bug.can someone run the below code on a sample directory with libs and see if the zip contains .libs.Please help
use Archive::Zip qw( :ERROR_CODES :CONSTANTS ); use File::Spec; use strict; use warnings; my $zipfile = shift or die "What's the zipfile?"; my $dir = shift or die "Where's the dir?"; my $zip = Archive::Zip->new(); opendir my $dh, $dir or die $!; print "\nDIR:$dir"; while ($_ = readdir( $dh)) { next if !/\.lib$/; $zip->addFile(File::Spec->catfile($dir, $_), $_); } closedir $dh; # Save the Zip file unless ( $zip->writeToFileNamed($zipfile) == AZ_OK ) { die 'write error'; }
In reply to Re^7: Creating a .zip file using perl
by Anonymous Monk
in thread Creating a .zip file using perl
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |