Discussion Locked

zip and Foxpro

0 helpful
6 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
How can I write a program to automatically zip up files that are generated by foxpro using a zip program?

6 replies

by steven_v_brown

I have written NT services that track usage of objects, indexs, databases, and containers and using zip ado applications compile a zip package.

But I am not sure this is what you are asking - could you clarify a little?

by steven_v_brown

use activex objects by loading the Office and Excel resource files.

To add an ActiveX control to a form
From the Form Controls toolbar, choose OLE Container Control and drag it to size in the form.
In the Insert Object dialog box, choose Insert Control.

Then using the new control create a new instance of Excel and drive the application...

FYI: Do not forget to close and quit all newly opend objects. If you dont it caused bad memory leaks!

by jasoncctc

Though there are a few ways to do this depending on your exact situation (i.e. Foxpro DOS vs Visual Foxpro, are the files generated all in the same directory or scattered, are the files the same each time or do the file names and number of generatedfiles change, etc), one solution that would work in FoxDOS and VFP and assuming all the files are in the same directory and PKZIP.EXE is available is a line of code like...

RUN C:\PKZIP.EXE C:\FOXFILES.ZIP C:\FOXAPP\*.*

All on one line. This will create the foxfiles zip file and copy everything within the foxapp folder (excluding subfolders unless you specify so with a command line switch).

Not very elegant but it works and can be modified to do quite a bit. Just depends on what yourcircumstances are...

Hope this helps.

This discussion is closed to new replies.