On Thu, 14 Jul 2016 13:32:38 +0200 (CEST), Michael Van Canneyt <mich...@freepascal.org> wrote:
>> Do you have an example of how to do the above with FPC ZLib? > >You can find this almost verbatim in the examples of paszlib, using the >zipper unit. > The one I found is this (a command line utility): uses Zipper; var OurZipper: TZipper; I: Integer; begin OurZipper := TZipper.Create; try OurZipper.FileName := ParamStr(1); for I := 2 to ParamCount do OurZipper.Entries.AddFileEntry(ParamStr(I), ParamStr(I)); OurZipper.ZipAllFiles; finally OurZipper.Free; end; end. It seems straightforward for my method to add all the supplied files in the stringlist the way the example does it. But this line: OurZipper.Entries.AddFileEntry(ParamStr(I), ParamStr(I)); seems to add the files to zip into some kind of internal list. Why does it take the same argument twice? One issue I had with PasZip is that I have not found a way to enter the extract (target) dir for the zipped files. Can I specify a relative target extract path in the TZipper case, for example relative to the folder where the zipfile being extracted resides? If so how? -- Bo Berglund Developer in Sweden _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal