E
ebm
I'm trying to have Archive::Zip zip a file on a windows systems. When
I create this file using the full path I end up with an empty zip
file.
Example:
use Archive::Zip qw( :ERROR_CODES :CONSTANTS );
my $file = 'c:/TEST.xls';
my $zip = Archive::Zip->new();
print STDOUT "Adding $file\n";
$zip->addFile($file) or warn "Error adding file $file\n";
die "write error." if $zip->writeToFileNamed ("c:/file.zip") !=
AZ_OK;
__END__
I will end up with c:/file.zip but it will be empty. Now If I copy
the xls file to the same directory the script is running in it will be
zipped into c:/file.zip. It seems to be something to do with the C:\
part of the path it doesn't like. The pod file says something about
using Unix file formats..... Am i screwed or is there a way around
this.
Is there a way around this problem. This is apart of a larger script
so I can't hard code any file names. Any ideas?
I create this file using the full path I end up with an empty zip
file.
Example:
use Archive::Zip qw( :ERROR_CODES :CONSTANTS );
my $file = 'c:/TEST.xls';
my $zip = Archive::Zip->new();
print STDOUT "Adding $file\n";
$zip->addFile($file) or warn "Error adding file $file\n";
die "write error." if $zip->writeToFileNamed ("c:/file.zip") !=
AZ_OK;
__END__
I will end up with c:/file.zip but it will be empty. Now If I copy
the xls file to the same directory the script is running in it will be
zipped into c:/file.zip. It seems to be something to do with the C:\
part of the path it doesn't like. The pod file says something about
using Unix file formats..... Am i screwed or is there a way around
this.
Is there a way around this problem. This is apart of a larger script
so I can't hard code any file names. Any ideas?