This project is read-only.

can I use wildcard characters to read the file names?

May 18, 2011 at 10:23 PM

I would like to read file names like so: ab*efg*mn.txt   and extract only ones that have these characters in the file name.

could this be done in dotnetzip ?

May 19, 2011 at 8:18 PM
Edited May 19, 2011 at 8:18 PM

Yes, see the documentation on ZipFile.ExtractSelectedEntries().

You can also use LINQ to select files to extract.

Examples on that:

May 23, 2011 at 9:47 PM

I couldn't find what I was looking for, but I think I got around this, see the code below: (ChannelNamesTemplateDecompose is a string array)

ChannelNamesTemplateDecompose = ChannelNamesTemplate[k]->Split(

gcnew array<wchar_t> { L'+'}); // decompose template txt file namesfor each (ZipEntry ^e in zip)  // within the same zip file search & extract requested txt file names




for(int j=0; j < ChannelNamesTemplateDecompose->Length; ++j) // for each txt file name parts that matches the file name to extract

          if (e->FileName->Contains(ChannelNamesTemplateDecompose[j]))



(ChannelNamesTemplateDecompose->Length == MatchCount)

            // do extraction here on selected files within zip file based on a template file names where file parts are seperated by "+"


 int MatchCount = 0;