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
|
|
Component Ace is all that it advertises. It is easy to implement and is very fast.
In addition, the customer support is the best I have ever had. All my questions were answered within hours, often immediately. The responses also answered my questions, no need for followup emails.
If your application needs the functionality that Component Ace provides, search no further.
Linda Murphy
|
|
|