FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour LFN2SFN Support for HB_UNZIP
Posts: 654
Joined: Fri Oct 21, 2005 05:54 AM
LFN2SFN Support for HB_UNZIP
Posted: Wed Dec 21, 2011 01:08 AM
Hi Friends,

I am getting error when I try to read the files using
Code (fw): Select all Collapse
HB_GETFILESINZIP( cInputFile )


It happens only when the file name is beyond 12 chars in length,
include its extension.

It did not work even with LFN2SFN function.

Can anybody suggest me a way out.

Thanks

- Ramesh Babu P
Posts: 1335
Joined: Fri Jun 13, 2008 11:04 AM
Re: LFN2SFN Support for HB_UNZIP
Posted: Wed Dec 21, 2011 05:27 AM
Dear Mr.Ramesh,

The below given code is working fine for me.

Code (fw): Select all Collapse
#include "FiveWin.ch"
#include "xBrowse.ch"
//------------------//
Function Main()
    Local aFiles,lOk,cFolder
    // Zip and Unzip functions, should include the libs named HbZip & zlib available in \xHarbour\lib
    cFolder:="E:\ZipTest\"
    
    // Array containing the list of files in the ZipFile with Path
    aFiles := hb_GetFilesInZip("LongFileNameZipFile")
    xBrowser aFiles
    
    lOk := hb_unzipfile("LongFileNameZipFile",,.T.,,cFolder,aFiles,NIL)
    MsgInfo(lOk)
Return lOk


Regards

Anser

Continue the discussion