Hi all,
would anybody tell me how to extract a zip archive
member to a certain directory?

I used the code below; however I can't extract the
member in other place than the present working
directory (namely, I am checking if the member has a
certain name and if true I extract it - this always
happens in the same directory where the archive
resides):

my $zip = Archive::Zip->new(); 
$zip->read($_) == 0 or die "Can't read ZIP file"; 
foreach my $member ($zip->members)
{                                               
  my $zip_member = $member->fileName;
  if($zip_member =~/$search_pattern/)
    {
        #print "\nI FOUND 1 file!\n";
        #must extract the found file from the archive
        $zip->extractMemberWithoutPaths($member);
    }
}

I tried $zip->extractMemberWithoutPaths($member,
$mydir); but it did not work; somehow I'm not able to
find what's missing here ...
Thanks a bunch,
Dan


 
____________________________________________________________________________________
Do you Yahoo!?
Everyone is raving about the all-new Yahoo! Mail beta.
http://new.mail.yahoo.com
_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to