如何用zip和unzip

micromiao 2002-03-22 01:50:12
如何用zip和unzip
...全文
63 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
snowmiao2002 2002-03-22
  • 打赏
  • 举报
回复
用法如下:
With TZip do
begin
ZipName := filepath+'temp.zip';
FilesList.Add(filepath+'temp.mdb');
Recurse := True;
StorePaths := false;
PackLevel := 9;
Zip;
end;
//
With vclUnzip1 do
begin
ZipName := opendialog.filename;
ReadZip;
//检测是否为需要的文件名
for J:=0 to Count-1 do
begin
if FileIsOk[J] then
if FullName[J]<>'temp.mdb' then
begin
showmessage('选择的文件内容错误,请重试!');
exit;//??
end
end;
//设置解压缩
DoAll := true;
DestDir := filepath;
RecreateDirs := False;
RetainAttributes := True;
//获得解压缩结果
descint:=Unzip;
if descint>0 then
whitewords 2002-03-22
  • 打赏
  • 举报
回复
问题不清,重新问过

5,939

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 开发及应用
社区管理员
  • VCL组件开发及应用社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧