How to unzip all files except some condition...

0

I need to be able to unzip all files from a .zip except, in this case, those files that names begin with ".".  I'm using vb.net, any idea how to do this?

I've tried the following...

 

' open the zip
            zip.Open(pathAndFileName)
            ' Extract all files except .* files.
            options.SearchCondition = Not (New NameSearchCondition(".*"))
            'zip.ExtractAll(localPath, options)

            zip.ExtractFiles(localPath, localPath, options)

zip
edited 11/28/2017 2:52:22 AM
asked 9/21/2016 5:50:36 PM
add a comment

1 Answers

0

You can use the following code:

[code lang='vb']Dim zip1 As New ComponentPro.Compression.Zip()

zip1.Create("d:\temp\test.zip")
zip1.AddFiles("d:\temp\2", True)
zip1.ExtractFiles("/", "d:\temp\3", Not(New NameSearchCondition(".*")))
 
zip1.Close()[/code]
 
answered 11/16/2017 12:41:37 AM
add a comment

Your Answer

Not the answer you're looking for? Browse other questions tagged zip or ask your own question.