Delphi Database, Delphi Components from ComponentAce
Products Download Order Contact us

Basic Example

 

Top 

The following example shows how to add files to archive and extract them:

       

       [C#]

       zipForge1.FileName ="C:\\TEST\\test.zip";

           // Create a new archive file

           zipForge1.OpenArchive(FileMode.Create);

           // Set path to folder with the files to archive

           zipForge1.BaseDir = "\\Source";

           // Add all files and directories from the source folder to the archive

           zipForge1.AddFiles("*.*");

           // Set path to the destination folder

           zipForge1.BaseDir = "\\Dest";

           // extract all files in archive

           zipForge1.ExtractFiles("*.*");

           // Close archive

           zipForge1.CloseArchive();

 

       [VB.NET]

       ' Set archive file name

       ZipForge1.FileName = "C:\TEST\test.zip"

       ' Create a new archive file

       ZipForge1.OpenArchive(System.IO.FileMode.Create)

       ' Set path to folder with the files to archive

       ZipForge1.BaseDir = DemoFolder + "\\Source"

       ' Add all files and directories from the source folder to the archive

       ZipForge1.AddFiles("*.*")

       ' Set path to the destination folder

       ZipForge1.BaseDir = DemoFolder + "\\Dest"

       ' extract all files in archive

       ZipForge1.ExtractFiles("*.*")

       ' Close archive

       ZipForge1.CloseArchive()

 

 

        © 2003 - 2024 ComponentAce  | .net zip component | barcode for .net | delphi zip component | delphi database Apr 29, 2024