Can I unzip with perl a WinZip does had a password ?

2003-09-16 Thread joachim . goerner
Hi all,

Can I extract with perl a WinZip-file which is protected with a password ?

I looked in 'Archive::Zip' and can find no password-parameter.

Best regards/Mit freundlichen Grüssen 
Joachim Görner 

Informationsverarbeitung Systemtechnik Basisdienste (ISB) 
ADAC e.V., Am Westpark 8, 81373 München 
Tel.: (089) 76 76 27 83 Fax: (089) 76 76 28 82 
mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]  
www.adac.de www.adac.de  



___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: Can I unzip with perl a WinZip does had a password ?

2003-09-16 Thread Gerber, Christopher J
 -Original Message-
 From: Steven Manross [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, September 16, 2003 12:47 PM
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Subject: RE: Can I unzip with perl a WinZip does had a password ?
 
 
 The Archive::Zip module does not currently create or extract encrypted
members.
 
 No passwords...
 
 :(
 
 You might try to script it using the pkunzip.exe and a system(pkunzip
blah blah blah) command...

You might also try calling WinZip externally using the following:

  Extracting Files

  The command format is: 
winzip32 -e [options] filename[.zip] folder

  where -e is required. 

  options
-o and -j stand for Overwrite existing files without prompting and 
Junk pathnames, respectively. Unless -j is specified, folder
information is used. Use -sPassword to specify a case-sensitive
password. The password can be enclosed in quotes, for example, 
-sSecret Password. 

  filename.zip
Specifies the name of the Zip file involved. Be sure to specify the
full filename (including the folder). 

  folder
Is the name of the folder to which the files are extracted. If the
folder does not exist it is created. 

Here's some quick, untested code to try...

code
my $Prog = $ENV{ProgramFiles}.'\\WinZip\\WINZIP32.exe';
my $Password = 'Secret Password';
my $ZIP  = 'filename.zip';
my $Path = 'c:\\my\\folder';
system($Prog -e -s\$Password\ \$Zip\ \$Path\);
/code

Chris


LEGAL NOTICE
Unless expressly stated otherwise, this message is confidential and may be privileged. 
It is intended for the addressee(s) only. Access to this E-mail by anyone else is 
unauthorized. If you are not an addressee, any disclosure or copying of the contents 
of this E-mail or any action taken (or not taken) in reliance on it is unauthorized 
and may be unlawful. If you are not an addressee, please inform the sender immediately.
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs