[C#] Need help on Zipping contents of a list file (.lst)

Oct 16, 2012 at 6:24 PM
Edited Oct 16, 2012 at 6:30 PM

I have a .lst file that has the paths of various data that has to be zipped. The path may be a direct path to an executable or a path to a log file or may contain a wildcard like - c:\abc\*.exe. How do I zip all of them into a single zip file? Thanks

Contents of .lst file :





This is what I tried:

using (ZipFile zip = new ZipFile()) 


StreamReader file = File.OpenText("C:\\pingman\\pingzipA.lst");               

string read = String.Empty;
        while ((read = file.ReadLine()) != null)               


zip.AddSelectedFiles(read, true);