Chilkat
HOME
Android™
ASP
Visual Basic
VB.NET
C#
iOS (IPhone)
Objective-C
C++
C
MFC
Delphi
FoxPro
Java
Perl
PHP Extension
PHP ActiveX
Python
PowerShell
Ruby
SQL Server
VBScript
Create a Zip with Exclusions
Create a Zip Excluding Directories and Files Matching a Set of Patterns ' Simple example to create a Zip with exclusions. Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim zip As New Chilkat.Zip() ' Anything begins the 30-day trial Dim unlocked As Boolean unlocked = zip.UnlockComponent("30-day trial") If (Not unlocked) Then MsgBox(zip.LastErrorText) Exit Sub End If zip.NewZip("test.zip") ' Exclude files and directories matching these patterns. Dim sa As New Chilkat.StringArray() sa.Append("*.dll") sa.Append("v1.0*") sa.Append("*.exe") zip.SetExclusions(sa) ' Append the files, excluding those that match the exclude patterns. Dim success As Boolean zip.AppendFromDir = "c:/WINDOWS/Microsoft.NET/Framework" success = zip.AppendFiles("*", True) If (Not success) Then MsgBox(zip.LastErrorText) Exit Sub End If ' Write the Zip file. success = zip.WriteZipAndClose() If (Not success) Then MsgBox(zip.LastErrorText) Else MsgBox("Created Zip!") End If End Sub Important: The download for this
example does not contain the ChilkatDotNet.dll which |
© 2000-2012 Chilkat Software, Inc. All Rights Reserved.