VB.NET Examples

ChilkatHOMEAndroid™ASPVisual BasicVB.NETC#iOS (IPhone)Objective-CC++CMFCDelphiFoxProJavaPerl
PHP ExtensionPHP ActiveXPythonPowerShellRubySQL ServerVBScript

VB.NET Examples

Bounced Mail
Bz2
Character Encoding
CSV
Digital Certificates
Digital Signatures
Email
FTP
HTML Conversion
HTTP
IMAP
Encryption
MHT / HTML Email
POP3
PFX
RSA
S/MIME
SMTP
Socket
Spider
SSH
SSH Tunnel
SSH Key
SFTP
Tar Archive
Upload
XML
XMP
Zip Compression
Misc

More Examples...
Amazon S3
Email Object
DKIM / DomainKey
NTLM
FileAccess
RSS
Atom
Self-Extractor
Service
PPMD
Deflate
DH Key Exchange
DSA
Bzip2
LZW

Byte Array
VB.NET FTPS
System.IO

 

 

 

 

 

 

Rename Files before Unzipping

Download: Chilkat .NET Assemblies

How to rename files before unzipping. The .zip is opened, the filenames are updated (in memory) so that when the .zip is unzipped, the filenames are different. The original .zip is unmodified.

'  
Dim zipObj As New Chilkat.Zip

        zipObj.UnlockComponent("Anything for 30-day trial")

        ' Open a zip archive containing:
        ' inv.dbf
        ' cust.dbf
        ' rpt.dbf
        ' test.xml
        ' junk.txt
        Dim success As Boolean
        success = zipObj.OpenZip("testData.zip")
        If (Not success) Then
            MessageBox.Show(zipObj.LastErrorText)
            Exit Sub
        End If

        ' Loop over the entries and rename all files ending in .dbf:
        Dim n As Integer
        Dim i As Integer
        Dim entry As Chilkat.ZipEntry
        n = zipObj.NumEntries
        For i = 0 To n - 1
            entry = zipObj.GetEntryByIndex(i)
            If (entry.FileName.EndsWith(".dbf")) Then
                entry.FileName = entry.FileName.Replace(".dbf", "01.dbf")
            End If
        Next

        ' Now unzip all .dbf files:
        n = zipObj.UnzipMatching("unzipDir", "*.dbf", False)
        If (n < 0) Then
            MsgBox(zipObj.LastErrorText)
        Else
            MsgBox(n.ToString() & " files unzipped!")
        End If

	' These files are created: cust01.dbf, rpt01.dbf, inv01.dbf

 

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

Mail Component · XML Parser