Thread Modul Archive::Zip , aber kein *.zip !!!: Please help... (16 answers)
Opened by Gast at 2004-03-25 11:38

Rambo
 2004-03-25 12:48
#48693 #48693
User since
2003-08-14
803 Artikel
BenutzerIn

user image
das hier geht! hab getestet!
Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
use Archive::Zip;
use strict;

my $log_dest = "C:\\TEMP\\ZIP";

my $zip = Archive::Zip->new();
chdir $log_dest or die "chdir $log_dest: $!";

opendir(DIR,$log_dest) or die "Can't open the current Directory: $!\n";
my @names = readdir(DIR) or die "Unable to read current dir:$!\n";

foreach my $fileName (@names) {
if ($fileName =~ /.LOG/) {
$zip->addFile($fileName);
}
}
my $zip_name = "test.zip";
print "\nZipping Files to $zip_name\n\n";
$zip->writeToFileNamed("$zip_name");

View full thread Modul Archive::Zip , aber kein *.zip !!!: Please help...