1-) C# Athena -
1-) dizini zip yapma
https://msdn.microsoft.com/tr-tr/library/system.io.compression.zipfile(v=vs.110).aspx
2-) örnek -> .dll eklemeyi unutma aşağıda ADRESİ
Ad alanı: System.IO.Compression
Derleme: System.IO.Compression.FileSystem (System.IO.Compression.FileSystem.dll içinde)
using System;
using System.IO;
using System.IO.Compression;
namespace ConsoleApplication
{
class Program
{
static void Main(string[] args)
{
string startPath = @"c:\example\start";
string zipPath = @"c:\example\result.zip";
string extractPath = @"c:\example\extract";
ZipFile.CreateFromDirectory(startPath, zipPath);
ZipFile.ExtractToDirectory(zipPath, extractPath);
}
}
}
!!!!kendim için!!!
string startPath = @"D:\Masaüstü\kullanılan iconlar\neyi\neyi1";//folder to add
string zipPath = @"D:\Masaüstü\kullanılan iconlar\nereye\neyi1.zip";//URL for your ZIP file
ZipFile.CreateFromDirectory(startPath, zipPath, CompressionLevel.Fastest, true);
2-) Dosyayı zip yapmak için
using (ZipArchive zip = ZipFile.Open(@"D:\Masaüstü\kullanılan iconlar\nereye\1.zip", ZipArchiveMode.Create)) {
zip.CreateEntryFromFile(@"D:\Masaüstü\kullanılan iconlar\neyi\neyi1\1.png", @"1.png");
}