Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2009-08

An example to compress all files in a directory?

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Unknown author

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.

Thank you in advance,
Luca

Michael Van Canneyt
to Unknown author
Show quoted text 5 lines
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.