I use ZipGenius, totally free.  Download from www.zipgenius.it (yes, Italy,
but the default language is excellent English).  I run ZipGenius within VFP
via "RUN /N", and use their Command Line Interface (CLI) syntax.  I will
include the code I use for one of my apps below so you get a Kick Start on
their syntax.  Not only does ZipGenius support Zip compression, but it also
builds self-extracting .exe files if desired.  Also you can truly encrypt
the .zip and output the ZipCrypted file as a .czip or self-extracting .zip
file.  I normally use their Blowfish option with either 128 or 256 bit
encryption.  Very versatile.

I used to use WinZip Pro so I could get the CLI and true encryption
capabilities now offered by ZipGenius.  If ZipGenius were not effective I
would have gladly kept having  my new clients license WinZip.  But ZipGenius
is so kick ass that there is no sense in continuing to use WinZip on a Go
Forward basis.

If found that when trying create a new .zip file where I already have a
target .zip file containing the same file names to be zipped, and I am using
the same target .zip file name, I need to delete the old .zip file before
running ZipGenius through VFP and their CLI.  It may just be me with the way
I am calling ZipGenius via CLI, but for what it is worth that is one part of
the sample code I am going to provide to you.  Also you will note the code
sample includes the old now remarked out, WinZip CLI commands just before
the new ZipGenius CLI commands.

Finally, this particular sample code does not use the Encryption
capabilities of ZipGenius, as the Source Files do not contain confidential
consumer or financial data.  For those kinds of files (.dbf. .cdx and .csv
files) I certainly do use their Encryption (I call it "ZipCryption").

Good Luck!


Gil



*v=========================================
*20080309, replaced following WinZip CLI code with ZipGenius further below

*Now Zip *.dbf files except Parts.dbf
*!*     RUN /N "C:\Program Files\WinZip\WZZip.exe" -xParts.dbf
P:\NFDRPriceVarianceServer\SourceDBF\SourceDBF_dbf.Zip
P:\NFDRPriceVarianceServer\SourceDBF\*.dbf

*Now Zip *.cdx files except Parts.cdx
*!*     RUN /N "C:\Program Files\WinZip\WZZip.exe" -xParts.cdx
P:\NFDRPriceVarianceServer\SourceDBF\SourceDBF_dbf.Zip
P:\NFDRPriceVarianceServer\SourceDBF\*.cdx

*Now Zip *.csv files
*!*     RUN /N "C:\Program Files\WinZip\WZZip.exe"
P:\NFDRPriceVarianceServer\SourceDBF\SourceDBF_csv.Zip
P:\NFDRPriceVarianceServer\SourceDBF\*.csv

*20080309, replaced WinZip with ZipGenius
*^=========================================

*v=========================================
*20080309, replacement ZipGenius CLI code:

*Sample Syntax:         "C:\Program Files\ZipGenius 6\zg" -add archive  
{options}
+file {-file}

*SET STEP ON

*Following lines delete previous .Zip file (no error returned if file(s)
does not exist)
RUN /N "C:\Program Files\ZipGenius 6\zg.exe" -destroy
P:\NFDRPriceVarianceServer\SourceDBF\SourceDBF_dbf.Zip
RUN /N "C:\Program Files\ZipGenius 6\zg.exe" -destroy
P:\NFDRPriceVarianceServer\SourceDBF\SourceDBF_csv.Zip

*Now Zip *.dbf files except Parts.dbf
RUN /N "C:\Program Files\ZipGenius 6\zg.exe" -add
P:\NFDRPriceVarianceServer\SourceDBF\SourceDBF_dbf.Zip C5 F0
+P:\NFDRPriceVarianceServer\SourceDBF\*.dbf -P:\NFDRPriceVarianceServer\Sour
ceDBF\Parts.dbf

*Now Zip *.cdx files except Parts.cdx
RUN /N "C:\Program Files\ZipGenius 6\zg.exe" -add
P:\NFDRPriceVarianceServer\SourceDBF\SourceDBF_dbf.Zip C5 F0
+P:\NFDRPriceVarianceServer\SourceDBF\*.cdx -P:\NFDRPriceVarianceServer\Sour
ceDBF\Parts.cdx

*Now Zip *.csv files
RUN /N "C:\Program Files\ZipGenius 6\zg.exe" -add
P:\NFDRPriceVarianceServerRUN /N "C:\Program Files\ZipGenius 6\zg.exe" -add
P:\NFDRPriceVarianceServer\SourceDBF\SourceDBF_csv.Zip C5 F0
+P:\NFDRPriceVarianceServer\SourceDBF\*.csv

*20080309, replacement ZipGenius CLI code:
*^=========================================





> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of John J. Mihaljevic
> Sent: Friday, August 01, 2008 11:18 AM
> To: [EMAIL PROTECTED]
> Subject: Creating a ZIP file from within VFP
>
>
> Hi all,
>
> Is there a way to create a ZIP file from within a VFP app?  If so, how can
> it be done?  Preferably without having to pay for any utilities.
>
> Thanks much!
>
> John
>
>
>
>
[excessive quoting removed by server]

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to