Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
[color blue]
CLEA
SET LIBRARY TO LOCFILE([vfpcompression.fll])
oZipData = CREATEOBJECT([Empty])
ADDPROPERTY(oZipData,[cZipObjectName],[])
ADDPROPERTY(oZipData,[nFileCount],0)
ADDPROPERTY(oZipData,[nFiles2Zip],0)
ADDPROPERTY(oZipData,[nBytesRead],0)
ADDPROPERTY(oZipData,[nTotalBytes],0)
oZipData.nFiles2Zip = ADIR(laTemp,[tablesbackup\*.*])
MESSAGEBOX([No of files to zip is ] + [tab]TRANSFORM(oZipData.nFiles2Zip))
ZipCallBack([ZipStatus()])
ZipFolderQuick(ADDBS(SYS(5) + SYS(2003)) + [tablesbackup],.F.)
ZipCallBack([])
RELEASE oZipData, laTemp
SET LIBRARY TO
[/color][color green]
*!* *!* *!* *!* *!* *!*[/color][color blue]
FUNCTION ZipStatus()[/color][color green]
*!* *!* *!* *!* *!* *!*[/color][color blue]
DO CASE
CASE nZipEvent = 0
[tab]? [Opening ] + cZipObjectName
CASE nZipEvent = 2
[tab]oZipData.nBytesRead = nZipBytes
CASE nZipEvent = 5
[tab]? [Closing ] + cZipObjectName
CASE oZipData.cZipObjectName = cZipObjectName
[tab]? TRANSFORM(oZipData.nBytesRead) ;
[tab][tab]+ [ bytes read]
CASE oZipData.cZipObjectName # cZipObjectName
[tab]oZipData.cZipObjectName = cZipObjectName
[tab]oZipData.nFileCount = oZipData.nFileCount ;
[tab][tab]+ 1
[tab]oZipData.nTotalBytes = oZipData.nTotalBytes ;
[tab][tab]+ oZipData.nBytesRead
[tab]? [Filename is ] ;
[tab][tab]+ PROPER(LOWER(JUSTFNAME(cZipObjectName)))
[tab]? [Zipped files count is ] ;
[tab][tab]+ TRANSFORM(oZipData.nFileCount)
[tab]? [Total bytes zipped is ] ;
[tab][tab]+ TRANSFORM(oZipData.nTotalBytes)
[tab]? [Files zipped is ] ;
[tab][tab]+ TRANSFORM(INT(oZipData.nFileCount / [tab][tab]oZipData.nFiles2Zip * 100)) ;
[tab][tab]+ [%][/color][color green] && Percentage value for progress bar[/color][color blue]
ENDCASE
ENDFUNC[/color][color green]
* EOF[/color]