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#]

       flexCompress1.FileName ="C:\\TEST\\test.fxc";

           // Create a new archive file

           flexCompress1.OpenArchive(FileMode.Create);

           // Set path to folder with the files to archive

           flexCompress1.BaseDir = "\\Source";

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

           flexCompress1.AddFiles("*.*");

           // Set path to the destination folder

           flexCompress1.BaseDir = "\\Dest";

           // extract all files in archive

           flexCompress1.ExtractFiles("*.*");

           // Close archive

           flexCompress1.CloseArchive();

 

       [VB.NET]

       ' Set archive file name

       flexCompress1.FileName = "C:\TEST\test.fxc"

       ' Create a new archive file

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

       ' Set path to folder with the files to archive

       flexCompress1.BaseDir = DemoFolder + "\\Source"

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

       flexCompress1.AddFiles("*.*")

       ' Set path to the destination folder

       flexCompress1.BaseDir = DemoFolder + "\\Dest"

       ' extract all files in archive

       flexCompress1.ExtractFiles("*.*")

       ' Close archive

       flexCompress1.CloseArchive()

 

 

        © 2003 - 2024 ComponentAce  | .net zip component | barcode for .net | delphi zip component | delphi database Nov 25, 2024