Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Unzipping a File

by chanakya (Friar)
on Nov 15, 2006 at 07:38 UTC ( [id://584115]=note: print w/replies, xml ) Need Help??


in reply to Unzipping a File

Why dont you try unzipping the zip file and see if the file exists.
#!/usr/bin/perl use strict; use warnings; use Data::Dumper; use Archive::Zip qw( :ERROR_CODES :CONSTANTS ); my $obj = Archive::Zip->new("./DBtest.zip"); my @members = $obj->memberNames(); #Get the list of members print Dumper @members; foreach my $memb (@members){ my $ret = $obj->extractMember($memb, "/tmp/test-folder/$memb") +; if($ret != 0){ print "Problem extracting $memb\n"; } }
Hope this helps

Replies are listed 'Best First'.
Re^2: Unzipping a File
by Anonymous Monk on Nov 15, 2006 at 13:26 UTC
    Thanks a Lot!!!
    It was a great help!!!!!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://584115]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (6)
As of 2024-04-23 19:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found