Thanks, T.Saravanan
using System; // This namespace contains the main class - ZipForge. // Don't forget to add a reference to the ZipForge // assembly to your project references using ComponentAce.Compression.ZipForge; // This namespace contains ArchiverException class // required for error handling using ComponentAce.Compression.Archiver; namespace DeleteFile { class Program { static void Main(string[] args) { // Create an instance of the ZipForge class ZipForge archiver = new ZipForge(); try { // Set the name of the archive file we want to create archiver.FileName = @"c:\test.zip"; // open an existing ZIP file archiver.OpenArchive(System.IO.FileMode.Open); // delete a file from archive archiver.DeleteFiles("file.txt"); archiver.CloseArchive(); } catch (ArchiverException ae) { Console.WriteLine("Message: {0}\t Error code: {1}", ae.Message, ae.ErrorCode); // Wait for the key to be pressed Console.ReadLine(); } } } }
LP MER
Login to post response