I have the following code to create a zipfile;
using (Ionic.Zip..ZipFile zip = new Ionic.Zip.ZipFile())
zip.AddSelectedFiles(selection, sourceDirectory, recurse);
where selection is: (name != .log) AND (name !=
When this is called I get the error: The entry name must be non-null and non-empty.
at Ionic.Zip.ZipEntry.Create(String nameInArchive, ZipEntrySource source, Object arg1, Object arg2)
at Ionic.Zip.ZipFile.AddOrUpdateDirectoryImpl(String directoryName, String rootDirectoryPathInArchive, AddOrUpdateAction action, Boolean recurse, Int32 level)
at Ionic.Zip.ZipFile._AddOrUpdateSelectedFiles(String selectionCriteria, String directoryOnDisk, String directoryPathInArchive, Boolean recurseDirectories, Boolean wantUpdate)
at Ionic.Zip.ZipFile.AddSelectedFiles(String selectionCriteria, String directoryOnDisk, Boolean recurseDirectories)
at UtilityFunctions.ZipDirectory(String zipFile, String sourceDirectory, Boolean recurse, String excludeFileFilter) in C:\c\UtilityFunctions.cs:line 202 (UtilityFunctions.ZipDirectory(C:\c\UtilityFunctions.cs:208))
However when I do the same but my selection is: name = .log AND name =
.log.txt I get no error, but as expected the zip-file does not contain files.
Using other selections with "name !"= or "filename !=" result all in the same error, for example name != *.log also results in the error.
I need to zip a whole directory all the files expect the .log and
.log.txt files. Can somebody explain what I am doing wrong?