Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Opening and Running WinZip from within VFP6.0 1

Status
Not open for further replies.

dakotafox

Programmer
Apr 14, 2000
53
US
We are generating XLS files from within Foxpro and wish to then Zip these multiple files and have them ready for posting to the Web. Current we are zipping them manually after exiting Foxpro. Has anyone done this?????

Thanks for all your great help as usual.
 
Hi DakotaFox,

AFAIK, WinZip doesnt support an ActiveX/COM/OLE interface, nor an API interface. However, with the release of version 8, WinZip includes an undocumented command-line interface.

See the following article for what parameters it accepts:

WinZip Command Line Parameters

A simplified example:
lcvar = 'C:\progra~1\winzip\winzip32 -a C:\my.zip C:\my.txt'
run &lcvar

Alternatively, you might wanna check out:

It has a zipping utility that claims to be faster and compress at a higher ratio than WinZip. It has an ActiveX, as well as an API interface. There is also an evaluation copy, but I have yet to test it. Jon Hawkins
jonscott8@yahoo.com

The World Is Headed For Mutiny,
When All We Want Is Unity. - Creed
 
You can also check out dynazip, this 3rd party package enables you to incorparate zipping files into your foxpro application.
The only thing you have to do is to supply your users with the freely distributable dll's.

see:
HTH,

Weedz (The Grassman)
veld4663@exact.nl

They cling emotionally to code and fix development rather than choosing practices based on analytical assesments of what works best.

After the GoldRush - Steve McConnell
 
DakotaFox

Another inexpensive alternative is the 32 bit command line version of PkZip, a newer version now available from
The following code is typical for a backup, using the older pkzip25.exe:-

lcTemp = ;
[tab][/N3 ] ;
[tab]+SYS(5) ;
[tab]+SYS(2003) ;
[tab]+[\pkzip25 -add -dir=full -exclude=*.bak -temp=];
[tab]+GETENV([windir]) ;
[tab]+[\temp ] ;
[tab]+USER.drive_lett ;
[tab]+[:\data ] ;
[tab]+SYS(5) ;
[tab]+SYS(2003) ;
[tab]+[\database\*.*]

! &lcTemp

Chris
 
faq182-221
David W. Grewe
Dave@internationalbid.com
ICQ VFP ActiveList #46145644
 
The variable process works in Winzip8.0 and by carrying it one step further, you can then open the self extracting file in Foxpro also
----------------------------------

CREATE THE SELF EXTRACTING EXE
(this accesses the zip file and creates the EXE in the same folder as the zip file)

lcvarself="c:\progra~1\winzip\wzsepe32 c:\workdata\testwinzip\my.zip"
run &lcvarself

now just need to figure out how to not have it stop and ask various questions of the user????
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top