This VB6 zip component example demonstrates how to find a file within a Zip when the filename is known but not the path. The same methods apply when using the Chilkat Zip library in C#, VB.NET, FoxPro, Delphi, Ruby, Perl, Python, Java, ASP, ASP.NET, C++, etc.
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