HB_UnzipFile Does not work (SOLVED Thank you ENRICO)

HB_UnzipFile Does not work (SOLVED Thank you ENRICO)

Postby Armando » Sun Feb 26, 2023 3: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: Select all  Expand view

   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
Last edited by Armando on Sun Feb 26, 2023 6:12 pm, edited 2 times in total.
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
User avatar
Armando
 
Posts: 3217
Joined: Fri Oct 07, 2005 8:20 pm
Location: Toluca, México

Re: HB_UnzipFile Does not work

Postby Enrico Maria Giordano » Sun Feb 26, 2023 11:17 am

Please check the content of aFiles and report back.
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: HB_UnzipFile Does not work

Postby Armando » 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
User avatar
Armando
 
Posts: 3217
Joined: Fri Oct 07, 2005 8:20 pm
Location: Toluca, México

Re: HB_UnzipFile Does not work

Postby Enrico Maria Giordano » Sun Feb 26, 2023 1:02 pm

Can I have the ZIP file to make a test here?
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: HB_UnzipFile Does not work

Postby Armando » Sun Feb 26, 2023 5: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
User avatar
Armando
 
Posts: 3217
Joined: Fri Oct 07, 2005 8:20 pm
Location: Toluca, México

Re: HB_UnzipFile Does not work

Postby Enrico Maria Giordano » Sun Feb 26, 2023 5:19 pm

Ok, 7-zip reports "Headers error". So it is a corrupted ZIP file.
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: HB_UnzipFile Does not work

Postby Armando » Sun Feb 26, 2023 5: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
User avatar
Armando
 
Posts: 3217
Joined: Fri Oct 07, 2005 8:20 pm
Location: Toluca, México

Re: HB_UnzipFile Does not work

Postby Armando » Sun Feb 26, 2023 5: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
User avatar
Armando
 
Posts: 3217
Joined: Fri Oct 07, 2005 8:20 pm
Location: Toluca, México

Re: HB_UnzipFile Does not work

Postby Enrico Maria Giordano » Sun Feb 26, 2023 5:38 pm

Please open the ZIP file with 7-Zip and look at File Menu and Properties item.
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: HB_UnzipFile Does not work

Postby Enrico Maria Giordano » Sun Feb 26, 2023 5:38 pm

I just extract the files and re-zip them and now it works properly.
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: HB_UnzipFile Does not work

Postby Armando » Sun Feb 26, 2023 5: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
User avatar
Armando
 
Posts: 3217
Joined: Fri Oct 07, 2005 8:20 pm
Location: Toluca, México

Re: HB_UnzipFile Does not work

Postby Armando » Sun Feb 26, 2023 5: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
User avatar
Armando
 
Posts: 3217
Joined: Fri Oct 07, 2005 8:20 pm
Location: Toluca, México

Re: HB_UnzipFile Does not work (SOLVED)

Postby Armando » Sun Feb 26, 2023 6: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
User avatar
Armando
 
Posts: 3217
Joined: Fri Oct 07, 2005 8:20 pm
Location: Toluca, México



Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Willi Quintana and 47 guests