Puedes utilizar los componentes ZipMaster que son gratuitos.
Aquí te pongo un ejemplo.
Código Delphi
[-]
Procedure Crear_Zip();
var
ZipArch: string;
begin
if FileExists(ZipArch) then
DeleteFile(ZipArch);
ZipArch:= '\\Facturacion\facturas\xxxx\Copias_Seguridad\FactPdx'+FormatDateTime('YYYYmmddhhmm',Now)+'.zip';
frCopiaSeg.pnMsge.Caption:='Comprimiendo ficheros en '+ZipArch;
if FileExists(ZipArch) then
DeleteFile(ZipArch);
frCopiaSeg.Zip.ZipFilename := ZipArch;
if frCopiaSeg.Zip.ZipFilename = '' then
begin
frCopiaSeg.mVisor.Lines.Add('Fallo al añadir archivo '+ZipArch);
exit;
end;
frCopiaSeg.Zip.AddOptions := [];
frCopiaSeg.Zip.FSpecArgs.Add('\\Facturacion\facturas\xxxx\AniPdx\*.Db');
frCopiaSeg.Zip.FSpecArgs.Add('\\Facturacion\facturas\xxxx\AniPdx\*.Mb');
frCopiaSeg.Zip.FSpecArgs.Add('\\Facturacion\facturas\xxxx\AniPdx\*.Px');
frCopiaSeg.Zip.FSpecArgs.Add('\\Facturacion\facturas\xxxx\AniPdx\*.X*');
frCopiaSeg.Zip.FSpecArgs.Add('\\Facturacion\facturas\xxxx\AniPdx\*.Y*');
try
frCopiaSeg.Zip.Add;
frCopiaSeg.mVisor.Lines.Add('El archivo '+ZipArch+' se creo con éxito!');
except
frCopiaSeg.mVisor.Lines.Add('Fallo al añadir archivo '+ZipArch);
end;
Un Saludo.