Chilkat
HOME
Android™
ASP
Visual Basic
VB.NET
C#
iOS (IPhone)
Objective-C
C++
C
MFC
Delphi
FoxPro
Java
Perl
PHP Extension
PHP ActiveX
Python
PowerShell
Ruby
SQL Server
VBScript
Delete Files from a Zip FileDownloads: MS Windows Visual C/C++ Libraries Linux/CentOS C/C++ Libraries MAC OS X C/C++ Libraries Solaris C/C++ Libraries C++ Builder Libraries Demonstrates how to delete files from a Zip archive. // Visual C++ Example Source Code to remove (delete) a file from a Zip archive // #include "stdafx.h" #include "CkZip.h" #include "CkZipEntry.h" int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { // Unlock the Zip product. // This only needs to be done once when the first CkZip object // is instantiated. CkZip zip; zip.UnlockComponent("unlockCode"); // Open an existing Zip file. zip.OpenZip("tree.zip"); // Find the "il941.pdf" entry CkZipEntry *entry = zip.FirstMatchingEntry("*/il941.pdf"); if (entry) { // Remove it from the Zip object. zip.DeleteEntry(entry); delete entry; } // Update the Zip archive. zip.WriteZipAndClose(0); return 0; }
|
© 2000-2010 Chilkat Software, Inc. All Rights Reserved.