Hi,
The example :
- rootfolder1
- subfolder1.1
- subfolder1.1.1
- filename1.1.1.1
- filename1.1.2
- subfolder1.2
- subfolder1.2.1
- filename1.2.2
- filename1.3
- filename1.4
- filename1.5
I need to zip subfolder1.1 folder, filename1.3, and filename1.5 into a zip file, while still preserving the folder structure of subfolder1.1.
Right now, what I can achieve is having filename1.3 and filename 1.5 and the content of subfolder1.1, I was not able to have the subfolder1.1 and then the content of subfolder1.1
My current code logic is
1. Create the zip file
2. Process the folders using FastZip : fz.CreateZip(fs, "rootfolder1\\subfolder1.1", true, string.Empty, string.Empty);
3. Include the filename1.3 and filename 1.5 using ZipFile : zipFile.Add(new FileDataSource(filename), Path.GetFileName(filename));
Based on the logic no. 2 : i know it will grab only the content, but i require the subfolder1.1 folder also before the content.
Is there any workaround for this?
Thanks.