Chilkat HOME ASP Visual Basic VB.NET C# Visual C++ C MFC Delphi FoxPro Java Perl PHP Python Ruby SQL Server VBScript
|
Replace File within a Zip Archive
C# code demonstrating how to replace a file within a Zip archive. Chilkat.Zip zip = new Chilkat.Zip(); zip.UnlockComponent("test"); zip.OpenZip("1.zip"); string fileToReplace = "1/parts/fne_title.gif"; // Delete the entry you are adding... Chilkat.ZipEntry entry = zip.FirstMatchingEntry("*/fne_title.gif"); if (entry != null) { zip.DeleteEntry(entry); } // Now add the updated file. bool saveExtraPath = true; zip.AppendOneFileOrDir(fileToReplace,saveExtraPath); zip.WriteZipAndClose(); Important: The download for this
example does not contain the ChilkatDotNet.dll which |
Need a specific example? Send a request to support@chilkatsoft.com
© 2000-2008 Chilkat Software, Inc. All Rights Reserved.