Here's a snippet from our script that is scheduled to zip all IIS log files
by server on a monthly basis. It uses Winzip... The nice thing about it, is
that it takes a list as an argument... The last time I attempted this with
PKZip, it did not accept a list, and the command line limit for arguments
was 8...?
# Zip the logfiles using Winzip Command Line Support Add-On
$command = ("$wzzip_exe -a $zipfile \@$filelist");
system(command);
HTH,
Mark
-----Original Message-----
From: Ken Januski [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 16, 2001 8:08 AM
To: Gary MacDonald; [EMAIL PROTECTED]
Subject: Re: Automating unzipping of files
Thanks Gary,
Someone else mentioned Perlzip module as a possibility. I'll try that
but I also want to try your suggestion. I've never used system to do
anything other than make calls to operating system commands. I never
realized I could also use it to run other commands. That could be just
what I need.
Ken
> Gary MacDonald wrote:
>
> If you don't insist on a pure Perl solution, then a system call to
> pkunzip does just fine. Here's a fragment of one of our scripts:
>
> print "Beginning download ...\n";
> $ftp->binary() or die "FTP binary failed\n";
> $ftp->get($datfile) or die "FTP get failed\n";
> print "Download completed ...\n";
> system ("\\\\server\\c\$\\util\\pkzip250\\pkunzip -o
> $datfile");
>
> Gary W. MacDonald
>
> -----Original Message-----
> From: Ken Januski [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 15, 2001 7:10 PM
> To: [EMAIL PROTECTED]
> Subject: Automating unzipping of files
>
> I need to watch an ftp server, download a zipped file when it becomes
> available, then run a perl script on it. I've written scripts to watch
>
> ftp servers before and I've written the final script to work on the
> unzipped file. But I'm not sure if I can automate the unzipping of the
>
> file. I've looked a little at CPAN and Active State but haven't found
> something that will work on winzip files. Does anyone know if such a
> module exists?
>
> Thanks
>
> ken
>
> _______________________________________________
> Perl-Win32-Admin mailing list
> [EMAIL PROTECTED]
> http://listserv.ActiveState.com/mailman/listinfo/perl-win32-admin
_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-admin
_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-admin