Is there any way to zip a folder with all sub-folders included?
I can go through each subdirectory and zip its contents - but it doesn't keep the directory structure, and results in all files (from each sub folder) in the one directory
Any help appreciated
Michael
1 Answer, 1 is accepted
0
Nikolay Demirev
Telerik team
answered on 13 Nov 2015, 08:26 AM
Hi Michael,
If you create entries with filenames relative to the root directory of the archive as the zip is a separate directory structure it will create subfolders. For example, if you create an entry with entry name "folder/file.ext" this will result in file containing a folder named "folder" and in this folder there will be a file named file.ext.
Another way to zip entire directory with all of its subdirectories and files is to use the ZipFile.CreateFromDirectory located in Telerik.Windows.Zip.Extensions.dll assembly.
Regards,
Nikolay Demirev
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items