Chilkat HOME ASP Visual Basic VB.NET C# Visual C++ C MFC Delphi FoxPro Java Perl PHP Python Ruby SQL Server VBScript
|
Find File in Zip by FilenameVisual Basic 6.0 example to find a file within a Zip archive by filename. ' Demonstrates how to find a file in a Zip when the filename
' is known, but not the path.
Dim zip As New ChilkatZip2
zip.UnlockComponent "Anything for 30-day trial"
success = zip.OpenZip("test.zip")
If (success = 0) Then
MsgBox zip.LastErrorText
Exit Sub
End If
' We want to find the file "dudeC.gif"
Dim zipEntry As ChilkatZipEntry2
' First, see if the exact match exists, without any directory path.
Set zipEntry = zip.FirstMatchingEntry("dudeC.gif")
' Now look for any entry with a path.
If (zipEntry Is Nothing) Then
Set zipEntry = zip.FirstMatchingEntry("*/dudeC.gif")
End If
If (zipEntry Is Nothing) Then
MsgBox "Not found!"
Else
MsgBox "Found!"
End If
|
Need a specific example? Send a request to support@chilkatsoft.com
© 2000-2008 Chilkat Software, Inc. All Rights Reserved.