I am creating zip using dotnetzip library.
But I don\'t know how to check if a file exists in the zip. If the file exists then I will update the file with path.
How to check whether file exists in zip file?
Just use LINQ Any, assume you have input zip file input.zip, to check whether input.zip contains input.txt:
Any
input.zip
input.txt
var zipFile = ZipFile.Read(@"C:\input.zip"); var result = zipFile.Any(entry => entry.FileName.EndsWith("input.txt"));