On Mon, 31 Aug 2009, luca_mangane...@comune.trento.it wrote:


Hi all,

I cannot find the documentation of Zipper so I ask you an example to
compress all files in a directory using this unit.

{$mode objfpc}
{$h+}
Program testzip;

uses Classes,Zipper;

Var
  S : TStringList;
  I : Integer;

begin
  S:=TStringList.Create;
  For I:=2 to ParamCount do
    S.Add(ParamStr(I));
  With TZipper.Create do
    try
      ZipFiles(ParamStr(1),S);
    Finally
      Free;
    end;
end.

run in directory on linux as

testzip myzipfile *.*

If you are on windows, you need to expand the *.* yourself.

Michael.
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to