Chilkat HOME ASP Visual Basic VB.NET C# Visual C++ C MFC Delphi FoxPro Java Perl PHP Python Ruby SQL Server VBScript
|
Create Password Protected Zip containing a Single File.Create a password-protected .zip containing a single file. (This uses the older Zip 2.0 encryption scheme, which is weaker and not as secure as AES encryption, which Chilkat Zip also supports.) LOCAL loZip LOCAL lnSuccess LOCAL lnSaveExtraPath loZip = CreateObject('Chilkat.Zip2') * Any string unlocks the component for the 1st 30-days. lnSuccess = loZip.UnlockComponent("Anything for 30-day trial") IF (lnSuccess <> 1) THEN =MESSAGEBOX(loZip.LastErrorText) QUIT ENDIF lnSuccess = loZip.NewZip("test.zip") IF (lnSuccess <> 1) THEN =MESSAGEBOX(loZip.LastErrorText) QUIT ENDIF loZip.SetPassword("secret") loZip.PasswordProtect = 1 lnSaveExtraPath = 0 lnSuccess = loZip.AppendOneFileOrDir("c:/temp/hamlet.xml",lnSaveExtraPath) lnSuccess = loZip.WriteZipAndClose() IF (lnSuccess <> 1) THEN =MESSAGEBOX(loZip.LastErrorText) QUIT ENDIF =MESSAGEBOX("Zip Created!") |
Need a specific example? Send a request to support@chilkatsoft.com
© 2000-2007 Chilkat Software, Inc. All Rights Reserved.
Mail Component · .NET Email Component · ASP Mail Component · XML Parser