BrunoLM
BrunoLM

Reputation: 100331

How to zip a folder recursively?

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?

Upvotes: 2

Views: 2766

Answers (1)

VinayC
VinayC

Reputation: 49195

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

Upvotes: 4

Related Questions