Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Example of extracting zipfile using DynaZip
Message
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00664640
Message ID:
00664658
Views:
21
>can anyone post example code of how they extract a zipfile using DynaZip ?

Here's an excerpt from one of my apps:
#define ZIP_SUCCESS 0
#define INCOMINGZIPNAME	"whatever.zip"

lcZipFileName = "a:\" + INCOMINGZIPNAME
lcZIPDestination = "c:\temp"

if !file(lcZipFileName)
   messagebox("File " + lcZipFileName + " not found!", 16, "Diskette")
   return .f.
endif

set procedure to DynaZip   && DynaZip.prg is a wrapper to DynaZip Easy UNZIP DLLs

poZipObj = CREATEOBJECT("DynaZip")
if poZipObj.RUN_UNZIP(lcZipFileName, lcZIPDestination, " *.*") = ZIP_SUCCESS
   * now we have unzipped files in \temp
   * move and or/merge unzipped  files (each one individually down below)
else
   * error unzipping
   wait clear
   messagebox("Error unzipping " + lcZipFileName + "!", 16, "UNZIP Error")
   RETURN .F.
endif

wait window "Erasing ZIP file from diskette..." NOWAIT
erase (lcZipFileName)
...
...


Alex Feldstein, MCP, Microsoft MVP
VFP Tips: English - Spanish
Website - Blog - Photo Gallery


"Once again, we come to the Holiday Season, a deeply religious time that each of us observes, in his own way, by going to the mall of his choice." -- Dave Barry
Previous
Reply
Map
View

Click here to load this message in the networking platform