Misread your question. Thought you needed to rename after the zip file was created. That was the requirement when you asked a very similar question in this message: Archive::Zip error when reading a zip file format error: bad signature. I assume your requirements have changed?
Try this - it will automatically create the output file as a Zip64 compliant Zip archive if required (i.e. if the size exceed 4 Gig or you have > 64 members in the zip archive). Otherwise it creates a standard Zip archive.
use Archive::Zip::SimpleZip qw($SimpleZipError) ; my $z = new Archive::Zip::SimpleZip "my1.zip" or die "Cannot create zip file: $SimpleZipError\n" ; $z->add('xyz.pl', Name => 'AnotherName.pl' ); $z->close();
If you want to force the creation of a Zip64 archive (even when the archive is small enough not to need it) add the Zip64 option when creating the Archive::Zip::SimpleZip object, like this
my $z = new Archive::Zip::SimpleZip "my1.zip", Zip64 => 1 or die "Cannot create zip file: $SimpleZipError\n" ;
In reply to Re: Renaming a file member in zip64 archive
by pmqs
in thread Renaming a file member in zip64 archive
by mhd.tahawi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |