Delphi Examples

ChilkatHOMEASPVisual BasicVB.NETC#Visual C++CMFCDelphiFoxProJavaPerlPHPPythonRubySQL ServerVBScript

Delphi Examples

Bounced Mail
Character Encoding
Digital Certificates
Digital Signatures
Email
FTP
HTML-to-XML
HTTP
IMAP
Encryption
MHT / HTML Email
RSA Encryption
S/MIME
Socket
Spider
String
Tar
Upload
XML
XMP
Zip Compression

More Examples...
Byte Array
Email Object
POP3
SMTP
RSS
Atom
Self-Extractor
Service
PPMD
Deflate
DH Key Exchange
DSA

Unreleased...
Bzip2
LZW
Bz2
Icon

Type Conversion

 

Article: Understanding COM References in Delphi

Find First Matching Entry in Zip

Download Chilkat Zip ActiveX

Demonstrates the zip.FirstMatchingEntry method.

{
  Demonstrates how to use zip.FirstMatchingEntry to locate
  a specific file within a zip.

  For this example, our .zip contains these entries:

dudeA.gif
setup.exe
b\
b\dudeAbc.gif
b\dudeXyz.gif
b\Setup.exe
b\123\
b\123\dude123.gif
b\123\test.txt

  NOTE: Your program may use forward or backward slashes.  It makes
  no difference in any of the zip component's methods or properties.
}
procedure TForm1.Button8Click(Sender: TObject);
var
  i : Integer;
  success : Integer;
  entry: IChilkatZipEntry2;
begin
  ChilkatZip21.UnlockComponent('anything for 30-day trial');

  // Open a zip.
  success := ChilkatZip21.OpenZip('test.zip');
  if (success = 0) then
    begin
      ChilkatZip21.SaveLastError('zipErrorLog.txt');
      ShowMessage(ChilkatZip21.LastErrorText);
    end
  else
    begin
        Memo1.Lines.Clear();

        // The first entry matching "*.exe" is "setup.exe"
        entry := ChilkatZip21.FirstMatchingEntry('*.exe');
        Memo1.Lines.Add(entry.FileName);

        // The first matching entry of "S*.exe" is "setup.exe"
        // because the matching is case insensitive.
        entry := ChilkatZip21.FirstMatchingEntry('S*.exe');
        Memo1.Lines.Add(entry.FileName);

        // The first matching entry of "b\*.gif" is b\dudeAbc.gif
        entry := ChilkatZip21.FirstMatchingEntry('b*.gif');
        Memo1.Lines.Add(entry.FileName);

    end;

end;

 

 

Need a specific example? Send a request to support@chilkatsoft.com

© 2000-2007 Chilkat Software, Inc. All Rights Reserved.

Mail Component · .NET Email Component · XML Parser