Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: how to extract zip files to specified location

by Punitha (Priest)
on Dec 06, 2007 at 12:47 UTC ( #655382=note: print w/replies, xml ) Need Help??


in reply to how to extract zip files to specified location

Hi try this,

use strict; use Archive::Zip; my $destinationDirectory = 'C:\test'; #####Specify your destination di +rectry to unzip the file my $zip = Archive::Zip->new('C:\00000007.zip'); #####This is the sourc +e zip file path foreach my $member ($zip-> members){ my $extractName = $member->fileName; $member->extractToFileNamed("$destinationDirectory\\$extractName") +; }

Punitha

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://655382]
help
Chatterbox?
[shmem]: hmm.. which makes emerge the question: is there a way to attach a subroutine to a variable, which is run as soon as that variable changes?
[moritz]: through a tie?
[shmem]: moritz: of course!
shmem slaps forehead m(
[shmem]: consider, then, @CBMonks as a tied variable which triggers withdrawing empty cups and serving new ones
[GotToBTru]: it's always teatime somewhere

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (9)
As of 2017-04-24 12:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (439 votes). Check out past polls.