VB.NET Examples

ChilkatHOMEASPVisual BasicVB.NETC#Visual C++CMFCDelphiFoxProJavaPerlPHPPythonRubySQL ServerVBScript

VB.NET Examples

Bounced Mail
Character Encoding
Digital Certificates
Digital Signatures
Email
FTP
HTML to XML
HTTP
IMAP
Encryption
MHT / HTML Email
PFX
RSA Encryption
S/MIME
Socket
Spider
Tar Archive
Upload
XML
XMP
Zip Compression
Misc

More Examples...
Email Object
POP3
SMTP
RSS
Atom
Self-Extractor

Byte Array
VB.NET FTPS
System.IO

Unreleased...
Service
PPMD
Deflate
Bzip2
LZW
Bz2
DH Key Exchange
DSA
Icon

 

 

 

 

 

 

Unzip One File from Zip without Overwriting Existing File

Download Chilkat .NET for 2.0 / 3.5 Framework

Download Chilkat .NET for 1.0 / 1.1 Framework

Locate and unzip a single file within a .zip, checking first to see if the file already exists before unzipping.

        ' This must be called once at the beginning of your program.
        zip.UnlockComponent("Anything for 30-day trial")

        ' Open a zip archive.
        Dim success As Boolean
        success = zip.OpenZip("myZip.zip")
        If (Not success) Then
            MessageBox.Show(zip.LastErrorText)
            Exit Sub
        End If

        ' Find the file to be unzipped.
        Dim entry As Chilkat.ZipEntry
        ' In this case, we know that test.txt is in a sub-directory within the zip.
        entry = zip.FirstMatchingEntry("*/test.txt")

        ' Does test.txt already exist in our current working directory?
        Dim f As New System.IO.FileInfo("test.txt")
        If (Not f.Exists) Then
            ' Extract into the current working directory, regardless of the path
            ' in the Zip.
            entry.ExtractInto(".")
        End If

        zip.CloseZip()




 

Need a specific example? Send a request to support@chilkatsoft.com

© 2000-2007 Chilkat Software, Inc. All Rights Reserved.

Mail Component · XML Parser