Chilkat
HOME
Android™
ASP
Visual Basic
VB.NET
C#
iOS (IPhone)
Objective-C
C++
C
MFC
Delphi
FoxPro
Java
Perl
PHP Extension
PHP ActiveX
Python
PowerShell
Ruby
SQL Server
VBScript
Find File in Zip by Filename
Visual 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
|
© 2000-2012 Chilkat Software, Inc. All Rights Reserved.