Archived Forum Post

Index of archived forum posts

Question:

Vb.net Zip a list of files

Apr 05 '16 at 09:59

I'm looking for a simple code snippet in VB.net to zip a simple list of files like "test.txt,pic.jpg,todo.doc"


Answer

You would simply call AppendOneFileOrDir for each file, and then call WriteZipAndClose after all file references have been appended.

In summary:

  1. Call zip.NewZip
  2. Call AppendOneFileOrDir once for each file.
  3. Call WriteZipAndClose