Jump to content
Fivewin Brasil

Hb_zipfile()


toya

Recommended Posts

Olá,

Estou de intrometido, mas estou com o mesmo problema. A versão do xHarbour é a 0.92. Segue o prg.

FUNCTION MAIN()

//IF HB_ZIPFILE( "contabil.ZIP","plano.dbf")

IF HB_ZIPFILE( "contabil.ZIP",{"f:\contab\plano.dbf","f:\contab\cont.dbf"})

qout("File was successly create")

ENDIF

return nil

Ou o programa trava ou gera um .zip com 0 bytes. Já tentei das formas acima (e outras mais) e dá sempre o mesmo problema.

[]s,

Evandro G. de Paula

Curvelo - MG

evandro@skillnet.com.br (Escr. - na Cidade)

imortal@skillnet.com.br (Res. - na Roça)

Link to comment
Share on other sites

Alexandre,

elaborei o teste com a lib que vc enviou ao Evandro.

Ocorreu o seguinte:

Se executar a compactacao de um só arquivo ela efetua:

Hb_ZipFile(cZip,'contabil.dbf')

Mas, se utilizar um vetor, somente compacta o primeiro arquivo:

cArq:=Directory( oVI:vpcPastaBanco+'ct_*.*')

aFiles:={}

set cent off

cZip:=oVI:vpcPastaBanco+'becape\ct'+strtran( dtoc( dData ), '/','' )+'.zip'

set cent on

for x:=1 to Len(cArq)

aadd(aFiles,cArq[x,1])

next

if hb_zipfile( cZip,aFiles )

msginfo('Compactação executada com sucesso!!!')

endif

Link to comment
Share on other sites

  • 4 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...