G
Geoff Cox
Hello,
I have a directory with 20 MS Word doc files in it and wish to create
a separate zip file for each doc file. The names to be doc1.zip,
doc2.zip, etc
Is the code below anywhere near?!
Cheers
Geoff
use warnings;
use strict;
use File::Find;
use Archive::Zip;
my $dir = 'd:/a-keep8/perl/test/business-location';
find( sub {
( my $name = $_ ) or return;
for (my $n=1;$n<21;$n++) {
my $zip = Archive::Zip->new( $_ );
$zip->writeToFileName(my $business-doc$n);
}
}, $dir );
I have a directory with 20 MS Word doc files in it and wish to create
a separate zip file for each doc file. The names to be doc1.zip,
doc2.zip, etc
Is the code below anywhere near?!
Cheers
Geoff
use warnings;
use strict;
use File::Find;
use Archive::Zip;
my $dir = 'd:/a-keep8/perl/test/business-location';
find( sub {
( my $name = $_ ) or return;
for (my $n=1;$n<21;$n++) {
my $zip = Archive::Zip->new( $_ );
$zip->writeToFileName(my $business-doc$n);
}
}, $dir );