FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour HB_UnzipFile Does not work (SOLVED Thank you ENRICO)
Posts: 3358
Joined: Fri Oct 07, 2005 08:20 PM
HB_UnzipFile Does not work (SOLVED Thank you ENRICO)
Posted: Sun Feb 26, 2023 03:03 AM
Hello friends of the forum:

I have spent several days trying to extract 900 files from a ZIP file with the following code
that I searched and copied from the forum but it doesn't work for me :oops:

Code (fw): Select all Collapse
   lMkDir( cDirGlb) <=== yes the folder is created correctly

   aFiles := hb_GetFilesInZip(cPathFile,(.T.))
   IF hb_UnzipFile( cPathFile,,,,cDriGlb,aFiles,nil)
      ? "Very Good"
   ELSE
      ? "Failed"
   ENDIF

And it doesn't unzip it, what am I doing wrong?

Best regards
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: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: HB_UnzipFile Does not work
Posted: Sun Feb 26, 2023 11:17 AM

Please check the content of aFiles and report back.

Posts: 3358
Joined: Fri Oct 07, 2005 08:20 PM
Re: HB_UnzipFile Does not work
Posted: Sun Feb 26, 2023 11:43 AM

Enrico:

Thanks for your advice, with ? LEN(aFiles) I got a number 5 and

yes, the zip file has five files in.

With

FOR nVez := 1 TO Len(aFilInZip)

  ? aFilInZip[nVez]

NEXT

I got five five files name

My tools FWH2013 & Harbour

Best regards

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: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: HB_UnzipFile Does not work
Posted: Sun Feb 26, 2023 01:02 PM

Can I have the ZIP file to make a test here?

Posts: 3358
Joined: Fri Oct 07, 2005 08:20 PM
Re: HB_UnzipFile Does not work
Posted: Sun Feb 26, 2023 05:11 PM
Enrico:

I just sent you a zip file to e.m.giordano@emagsoftware.it address.

The zip file has five records only.

I really appreciate your help

Best regards
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: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: HB_UnzipFile Does not work
Posted: Sun Feb 26, 2023 05:19 PM

Ok, 7-zip reports "Headers error". So it is a corrupted ZIP file.

Posts: 3358
Joined: Fri Oct 07, 2005 08:20 PM
Re: HB_UnzipFile Does not work
Posted: Sun Feb 26, 2023 05:28 PM

Enrico:

I understand, I open it with Winrar and there are no error reports

Regards

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: 3358
Joined: Fri Oct 07, 2005 08:20 PM
Re: HB_UnzipFile Does not work
Posted: Sun Feb 26, 2023 05:36 PM

Enrico:

I have downloaded 7-Zip to open the ZIP file and I have no problems at all

Best regards

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: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: HB_UnzipFile Does not work
Posted: Sun Feb 26, 2023 05:38 PM

Please open the ZIP file with 7-Zip and look at File Menu and Properties item.

Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: HB_UnzipFile Does not work
Posted: Sun Feb 26, 2023 05:38 PM

I just extract the files and re-zip them and now it works properly.

Posts: 3358
Joined: Fri Oct 07, 2005 08:20 PM
Re: HB_UnzipFile Does not work
Posted: Sun Feb 26, 2023 05:47 PM

Enrico:

Can I have your new Zip file?, I'll try with it.

Regards

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: 3358
Joined: Fri Oct 07, 2005 08:20 PM
Re: HB_UnzipFile Does not work
Posted: Sun Feb 26, 2023 05:52 PM

Enrico:

Yes you are right, there is an error.

Pls do not send me your zip file.

Regards

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: 3358
Joined: Fri Oct 07, 2005 08:20 PM
Re: HB_UnzipFile Does not work (SOLVED)
Posted: Sun Feb 26, 2023 06:12 PM

Enrico:

Now all is fine.

Thank you very much.

With best regards

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: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: HB_UnzipFile Does not work (SOLVED Thank you ENRICO)
Posted: Sun Feb 26, 2023 06:27 PM

You're welcome.

Continue the discussion