0

I have a existing zip archive and want to change a file which is already in the zipfile. Furthermore I want to add an file to the existing zip archive. I tried with TZipFile but it doesn't offer the required functionality. But Abbrevia should be able to but I don't know how.

coZip := TAbZipper.Create(nil);

coZip.OpenArchive(ContainerFileName);

coZip.ChangeFile(xxx); // What to do here? ChangeFile or similar function does not exist

coZip.AddFiles("NewFile.txt");

Any suggestions how to do that?

Ranga B.
  • 627
  • 10
  • 20
  • 2
    Unrelated to any framework was the idea of ZIP archives to mark existing entries as deleted and add a new entry instead of rebuilding the whole ZIP file and actually removing entries. https://sourceforge.net/projects/tpabbrevia/files/Documentation/3.04/tpabbrevia_docs.zip/download mentions AddFiles() and DeleteFiles() in TAbZipOutline. – AmigoJack Apr 22 '20 at 10:40
  • Thank you. I ended up using TZipFile with this solution https://stackoverflow.com/questions/13164299/delphi-xe2-tzipfile-replace-a-file-in-zip-archive – Ranga B. Apr 27 '20 at 15:42
  • That link is a question - you probably mean https://stackoverflow.com/a/13165888/4299358 – AmigoJack Apr 30 '20 at 15:29

0 Answers0