Method to unpack zip files in Delphi

 procedure TMForm.UnzipFile(const ZipFileName, DestinationFolder: string);

var

  Zip: TZipFile;

begin

  Zip := TZipFile.Create;       // use System.Zip

  try

    Zip.Open(ZipFileName, zmRead);      // ZIP 파일 열기 (읽기 전용 모드)

    Zip.ExtractAll(DestinationFolder);  // 전체 파일 압축 해제

  finally

    Zip.Free;

  end;

end;

댓글 없음:

댓글 쓰기