Vclzip 压缩问题
我想压缩D:\软件内的Test文件夹 ,压缩完成后,压缩包内的文件是:软件\Test。我是想要的是压缩包内只有Test文件夹。请问一下我要怎么设置~~
代码:
with VclZip1 do
begin
zipname:=savename;
if (memo1.Lines.Strings[0] <>'') and (Edit1.Text <>'') then
begin
For i:=0 to memo1.Lines.Count-1 do
VclZip1.FilesList.Add(memo1.Lines.Strings[i]);
memo1.Clear;
end
else
exit;
Recurse := True;
StorePaths:=True;
//RelativePaths := True ;
PackLevel:=9;
try
FileCount:=zip;
MessageBox(
Handle,
Pchar('压缩完毕!' + #13 + ' 共压缩了 ' + inttostr(FileCount)+'个文件'),
'提示',
MB_OK+MB_ICONQUESTION
);
except
on E:Exception do
begin
MessageBox(
Handle,
pchar('压缩失败!' + #13 + E.Message +' '),
'提示',
MB_OK+MB_ICONERROR
);
exit;
end;
end;
end;