Zip a USB pen drive

0 votes
asked Mar 25, 2011 by Daniele (140 points)
edited Mar 12, 2012

Dear Rebex I want to zip a complete drive. In my case it is a USB pen drive. When I try to do this I receive a error.

It is the same when I try to use your example WinFormZip_VB

I receive error at this line: New FileSet(folderBrowserDialog.SelectedPath) Invalid path "h:\"

How can I solve this problem?

Thank you in advance

Daniele

Applies to: Rebex ZIP

1 Answer

0 votes
answered Mar 28, 2011 by Lukas Matyska (59,010 points)
edited Mar 12, 2012

This is a bug in the FileSet class. It will be fixed in the next release.

To workaround this bug in the meanwhile, please use the Add(string) method instead of the Add(FileSet) method.

E.g. like this:

Using archive As New ZipArchive(path)
    archive.Add("h:\")
End Using

UPDATE The fix is part of Release 2012 R1.

...