This sample shows how use ZipForge transactions.
Download ZipForge | Learn More | All Delphi samples
unit uMain;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, Buttons, ZipForge;
type
TfmMain = class(TForm)
bnStart: TBitBtn;
BitBtn2: TBitBtn;
Label1: TLabel;
Archiver: TZipForge;
procedure bnStartClick(Sender: TObject);
procedure BitBtn2Click(Sender: TObject);
private
public
end;
var
fmMain: TfmMain;
implementation
{$R *.DFM}
procedure TfmMain.bnStartClick(Sender: TObject);
begin
with Archiver do
begin
FileName := 'Archive\test.zip';
OpenArchive(fmCreate);
BeginUpdate;
BaseDir := 'Source';
try
AddFiles('*.*');
except
CancelUpdate;
CloseArchive;
ShowMessage('Error adding all files');
Exit;
end;
BaseDir := 'Source1\';
try
AddFiles('*.htm*');
except
CancelUpdate;
CloseArchive;
ShowMessage('Error adding html files');
Exit;
end;
EndUpdate;
BaseDir := 'Dest';
ExtractFiles('*.*');
CloseArchive;
end;
ShowMessage('All files were added and extracted successfully.');
end;
procedure TfmMain.BitBtn2Click(Sender: TObject);
begin
Close;
end;
end.
Download ZipForge | Learn More | All Delphi samples
|
|
|
Current version: 6.95
Released: January 21, 2019
Price: $ 69
 
|
|
We made three requests of the technical support personnel and despite the fact that these were all implementation questions (not bugs in their software) we received support within 24 hours. It is rare to get such good customer support these days and I really appreciate everything ComponentAce has done for us.
Jason Goodridge, Development Manager
|
|
|