problems making zip with Archive::Zip

M

mcardeiro

Hi,

I am having problems making a simple zip file using Archive::Zip.

I basically want to take some files and make a zip archive that can be
read by windoze.

Heres my code:
use Archive::Zip qw:)ERROR_CODES :CONSTANTS);

my $zip = Archive::Zip->new();
$zip->addFile('/home/eastmail/p.pdf');
$zip->writeToFileNamed( '/home/eastmail/oBoy.zip' );


when I run the script I get no errors and file '/home/eastmail/
oBoy.zip' is created but when I try to open on windows I get an error
that it is not a valid zip.

anybody have experience making zips in perl (the documentation on this
module is not so great).

Mike Cardeiro
 
M

mcardeiro

"when I try to open on windows" is a rather inprecise description,
but I take a stab and guess you are talking of the Windows Explorer
built-in "Zip compressed folder". If that's the case, you are
likely having issues with unix file names and absolute paths.


You ROCK...I have been agonizing over this off and on for days...thank
you chris!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top