Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Error while Zipping a Directory

by poj (Abbot)
on Aug 24, 2015 at 08:13 UTC ( [id://1139646]=note: print w/replies, xml ) Need Help??


in reply to Error while Zipping a Directory

Try
#!/usr/bin/perl use strict; use warnings; use Archive::Zip qw(:ERROR_CODES :CONSTANTS); my $directory = 'D:\WorkArena\Data\Final build'; my $obj = Archive::Zip->new(); $obj->addTree( $directory ); # Write the files to zip. if ($obj->writeToFileNamed('dummy.zip') == AZ_OK) { # write to disk print "Archive created successfully!"; } else { print "Error while Zipping !"; }
poj

Replies are listed 'Best First'.
Re^2: Error while Zipping a Directory
by sanvin (Novice) on Aug 24, 2015 at 10:07 UTC
    ThanQ poj...It works fine. Have a good time.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (1)
As of 2024-04-25 07:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found