Xceed Zip Compression Library Documentation
Listing the contents of a zip file by collection (VB.NET example)
Example topics > Listing the contents of a zip file by collection (VB.NET example)
 
VB.NET Copy Code

Dim zip As New XceedZipLib.XceedZipClass()

zip.License( "your license key" )

 

' Specify which files are to be listed.
' Setting this property to string.Empty
' we result in all the files being listed.
zip.FilesToProcess = string.Empty 

' Specify the name and location of the zip file.
zip.ZipFilename = "d:\fonts.zip" 

' Get a listing of the files
Dim zipItems As Object = Nothing 

Dim result As XceedZipLib.xcdError = zip.GetZipContents( zipItems, XceedZipLib.xcdContentsFormat.xcfCollection ) 

' Iterate through the collection
Dim item As XceedZipLib.XceedZipItem

For Each item in CType( zipItems, XceedZipLib.XceedZipItems )
   listBox1.Items.Add( item.Filename )
Next item 

MessageBox.Show( zip.GetErrorDescription( XceedZipLib.xcdValueType.xvtError, CType( result, Integer ) ) )