FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Validate ZIP before opening it
Posts: 3358
Joined: Fri Oct 07, 2005 08:20 PM
Validate ZIP before opening it
Posted: Tue Feb 28, 2023 11:20 PM

Hello friends of the forum:

Is there a function in Harbor that allows you to check if a ZIP file is damaged or corrupt?

before trying to open it?

Greetings

SOI, s.a. de c.v.
estbucarm@gmail.com
http://www.soisa.mex.tl/
http://sqlcmd.blogspot.com/
Tel. (722) 174 44 45
Carpe diem quam minimum credula postero
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM
Re: Validate ZIP before opening it
Posted: Wed Mar 01, 2023 08:31 AM
hi,

every "Packer" have Option
-t Test .ZIP file integrity
---

as long "Standard" Compression is used all "Packer" can handle it but when change Compression Mode there might be Problem
but "max" Compression is not real need any more since "big" HDD/SDD and quick Internet

so "just use ZIP as "Envelope""
greeting,

Jimmy
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Validate ZIP before opening it
Posted: Wed Mar 01, 2023 09:14 AM
Armando wrote:Hello friends of the forum:

Is there a function in Harbor that allows you to check if a ZIP file is damaged or corrupt?
before trying to open it?

Greetings
Just try to unzip the ZIP file with HB_UNZIPFILE() and check the return value.
Posts: 8515
Joined: Tue Dec 20, 2005 07:36 PM
Re: Validate ZIP before opening it
Posted: Wed Mar 08, 2023 08:33 PM
Intenta con:
Code (fw): Select all Collapse
   ? "The comment in test.zip is:", hb_GetZipComment( "test.zip" )
https://harbour.github.io/doc/hbziparc.html

Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341

Continue the discussion