2

I found this other question where Simon show a simple way to zip a folder. However this method doesn't seem to include sub-folders.

Is there some property or parameter that I have to set so it will also include sub-folders and all files in it? Or is there another way of doing it?

Community
  • 1
  • 1
BrunoLM
  • 97,872
  • 84
  • 296
  • 452

1 Answers1

4

ZipFile.AddDirectory works recursively i.e. it would add sub-folders. Check the documentation: http://cheeso.members.winisp.net/DotNetZipHelp/html/3d01a0e2-c96e-f135-a78a-3668aefeda43.htm

VinayC
  • 47,395
  • 5
  • 59
  • 72
  • Actually it was my mistake, I had two directories with the same name and didn't notice I was picking the wrong one. I'm accepting your answer as it shows the reference to the documentation where it states it is recursive. Thanks for the link. – BrunoLM Dec 24 '10 at 04:11