Yes this is what I'm trying to do now.
I will see if it's gonna work
O, yeah, another method is just looping through all the files yourself and extracting all that begins with you path.
Like this:
procedure TForm1.Button1Click(Sender: TObject);
var
AbUnZipper: TAbUnzipper;
i : Integer;
begin
AbUnZipper := TAbUnzipper.Create(nil);
try
ForceDirectories('c:\temp\t4');
AbUnZipper.BaseDirectory := 'c:\temp\t4';
AbUnZipper.FileName := 'c:\temp\test.zip';
AbUnZipper.ExtractOptions := [eoCreateDirs, eoRestorePath];
//AbUnZipper.ExtractFiles('tpabbrevia\*.*'); // <-- doesn't work on sub-subfolders
for i := 0 to pred(AbUnZipper.Count) do
if Pos(uppercase('tpabbrevia/'), uppercase(AbUnZipper.Items[i].Filename)) = 1 then
AbUnZipper.ExtractAt(i, '');
ShowMessage('done');
finally
AbUnZipper.Free;
end;
end;
It's like how Abbrevia does it in TAbArchive.ExtractFilesEx(). Do note the forward slash after the path-name. Internally a zip normally has forward slashes so you need to check path/ as beginning of the filename.
(Above example works for me)