Zip Component, Email Component, Encryption Component ActiveX Control for Zip Compression .NET Components for ASP.NET
ActiveX and .NET Components for Zip Compression, Encryption, Email, XML, S/MIME, HTML Email, Character Encoding, Digital Certificates, FTP, and more ASP Email ActiveX Component


Index of Chilkat Blog Posts

October 10, 2005

Zip ActiveX VB6 Example

Question:

Today I downloaded your trial zip ActiveX tool. I need the ability to create directories in the zip file. Will your product do this. I have listed an example of what I need to do below.

Ex. 1. Create directory x (may or may not be on disk)
2. Create Directory y under x (may or may not be on disk)
3. Place file z.txt in y

So the zip file should have the structure "x/y/z.txt"

Can I do this?

Answer:

Yes, here is the VB6 code:

Private Sub Command1_Click()

Dim zip As New ChilkatZip2
zip.UnlockComponent "trial"

zip.NewZip "test.zip"
zip.PathPrefix = "x/y/"
zip.AppendOneFileOrDir "test.txt", 0

zip.WriteZipAndClose

End Sub


Privacy Statement. Copyright 2000-2011 Chilkat Software, Inc. All rights reserved.
Send feedback to support@chilkatsoft.com

Components for Microsoft Windows XP, 2000, 2003 Server, Vista, Windows 7, and Windows 95/98/NT4.