Dear Mr.Frances,
The below given code is working fine for me.
hb_unzipfile("Apps.Zip",,.T.,,cExtractToPath,aFiles,NIL) returned .T. for me
I have used FWH 10.6 Buildx.bat to compile and run the test.
- Code: Select all Expand view
#include "Fivewin.ch"
//----------------------------//
Function Main()
Local oDlg,oBtn
DEFINE DIALOG oDlg TITLE "Test UnZip"
@1,5 BUTTON oBtn PROMPT "Unzip" ;
ACTION MsgInfo( If(ExtractZip("D:\MyTest\"),"OK","Not OK") ) // Returned .T.
ACTIVATE DIALOG oDlg
Return NIL
*------------------------------------*
Function ExtractZip(cExtractToPath)
*------------------------------------*
Local aFiles,lOk
// Zip and Unzip functions, should include the libs named HbZip & zlib available in \xHarbour\lib
// Array containing the list of files in the Zip with Path
aFiles := hb_GetFilesInZip("Apps")
// The 3rd Parameter should be .T. if you need to extract contents of zip file as per Path
lOk := hb_unzipfile("Apps",,.T.,,cExtractToPath,aFiles,NIL)
Return lOk
The contents of the zip file (Apps.zip) was properly extracted inside the folder D:\MyTest
I suggest you to check the path
Regards
Anser