The following code deletes all files ending with ".txt" from the zip file named "c:\test\my test.zip". The example assumes you have a button and an Xceed Zip control on a form named Button1 and XceedZip1 respectively.
Delphi |
Copy Code |
procedure TForm1.Button1Click(Sender: TObject);
var ResultCode: xcdError; begin
XceedZip1.License( 'your license key' );
{ All properties keep their default values except the two below } XceedZip1.FilesToProcess := '*.txt'; XceedZip1.ZipFilename := 'c:\test\my test.zip';
{ Start the delete operation } ResultCode := XceedZip1.RemoveFiles;
{ Check the return value. If ResultCode = xerSuccess, it worked } end; |