I am trying to zip a directory with 8 sub folders, each containing one .csv file. Using the example for zipping a folder, the result only includes the first 5 of the original 8 sub folders. This is consistent across other input folders with varying number of subfolders. I am using a current Total license, is there an update needed? The .csv files for the first 5 folders in the result are intact.
using Aspose.Zip;
using System.IO;
namespace ZipFilesInFolder
{
class Program
{
static void Main(string[] args)
{
string path = @"E:\Temp\";
//creates zip folder
using (FileStream zipFile = File.Open(path + "Result.zip", FileMode.Create))
{
using (Archive archive = new Archive())
{
DirectoryInfo dir = new DirectoryInfo(path + "FolderToZip");
archive.CreateEntries(dir, false);
archive.Save(zipFile);
}
}
}
}
}