У меня есть 1 папка, которая содержит много текстовых файлов.Я хочу сжать их, но разделить.
Пример:
В этой папке у меня есть A.txt , B.txt , C.txt.
Я хочу сжать все файлы, но разделить их так, чтобы результат был A.zip , B.zip , C.zip.
string outputPath = "C:\\Users\\Desktop\\VA";
string path = outputPath + "\\VA_" + tglskrg;
foreach (string dirFile in Directory.GetDirectories(path))
{
foreach (string fileName in Directory.GetFiles(dirFile))
{
using (ZipFile zip = new ZipFile())
{
zip.UseUnicodeAsNecessary = true;
zip.AddFile(); //dont know what to put
zip.Save(); //dont know what to put
}
}
}
Буду признателен за любую помощь.
Я использую dotnetzip (Ionic.zip) и C # Visual Studio Express 2010.