You need WinZip8 and the addon for command line WzZip and WZUnzip.
I use them with this prg code:
first I create a .bat file and then execute it with ! command
parameters DirOrigen, FileName, DirDestino, Criterio, Modo, Estruct, List
WZipDir = trim(FULLPATH(""))
IF FILE('Zip.bat')
delete file zip.bat
endif
gnErrFile = FCREATE('Zip.bat')
IF gnErrFile < 0
messagebox("Error de lectura")
ELSE
if modo = "Z"
pathOrigen = trim(dirOrigen)+trim(Criterio)
pathDestino = trim(dirDestino)+trim(FileName)
=Fwrite(gnErrFile , (WZipDir))
=Fwrite(gnErrFile , 'wzzip ')
if Estruct = 'S'
=FWRITE(gnErrFile, '-rp ' )
endif
if List = 'S'
=FWRITE(gnErrFile, '-v ' )
endif
=FWRITE(gnErrFile, (pathDestino) )
=Fwrite(gnErrFile, ' ' )
=Fputs(gnErrFile, (pathOrigen))
else
pathOrigen = trim(dirOrigen)+trim(FileName)
pathDestino = trim(dirDestino)
=Fwrite(gnErrFile , (WZipDir))
=Fwrite(gnErrFile , 'wzunzip ')
if Estruct = 'S'
=FWRITE(gnErrFile, '-d ' )
endif
if List = 'S'
=FWRITE(gnErrFile, '-v ' )
endif
=FWRITE(gnErrFile, (pathOrigen) )
=Fwrite(gnErrFile, ' ' )
=Fputs(gnErrFile, (pathDEstino))
endif
ENDIF
=FCLOSE(gnErrFile )
!Zip.bat
bye
fabian
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only