Chilkat HOME ASP Visual Basic VB.NET C# Visual C++ C MFC Delphi FoxPro Java Perl PHP Python Ruby SQL Server VBScript
|
Zip with ExclusionsThis example shows how to create a Zip while excluding files matching a pattern, or subdirectories having a specified name. ***********************************************************
*** Visual FoxPro Example Programs by Chilkat Software
*** Visual FoxPro Source Code Examples for Zip Compression
*** Visual FoxPro Examples for Zip Compression
*** Zip Compression in Visual FoxPro
***********************************************************
* Demonstrates how to create a Zip while excluding files matching a pattern.
LOCAL zip, sArray
zip = CreateObject('Chilkat.Zip2')
zip.UnlockComponent('anything for 30-day trial')
* Create a new Zip and append files and directories recursively.
zip.NewZip("myZip.zip")
* Exclude all of these types of files.
* The ChilkatUtil component is included with the Zip download.
sArray = CREATEOBJECT('ChilkatUtil.CkStringArray')
sArray.Append("*.obj")
sArray.Append("*.exe")
sArray.Append("*.ncb")
sArray.Append("*.db")
* Assign the exlusions to the Zip object.
zip.SetExclusions(sArray)
* Also exclude directories named "Sounds", "Debug" and "Release", wherever found.
zip.ExcludeDir("Debug")
zip.ExcludeDir("Release")
zip.ExcludeDir("Sounds")
* Append the files, excluding everything we've specified.
zip.AppendFiles("./Tree/*",1)
zip.WriteZipAndClose
RELEASE zip
RELEASE sArray
RETURN .T.
***********************************************************
*** Visual FoxPro Source Code Samples for Zip Compression
*** Visual FoxPro Sample Programs by Chilkat Software
*** Visual FoxPro Samples for Zip Compression
*** Zip Compression in Visual FoxPro
***********************************************************
|
Need a specific example? Send a request to support@chilkatsoft.com
© 2000-2007 Chilkat Software, Inc. All Rights Reserved.
Mail Component · .NET Email Component · ASP Mail Component · XML Parser