2013-06-04 2 views
0

하나의 ZIP 파일에 여러 개의 하위 디렉토리를 가질 수있는 전체 디렉토리를 압축하려고합니다. Ionic.Zip dll을 사용하고 있지만 돈은 없습니다. 계속하는 법을 모르겠습니다.폴더 내의 모든 하위 폴더 수에 관계없이 C# 폴더를 압축하십시오.

개인 무효 ZipFiles (문자열 zipPath, 문자열의 SourceDirectory, 문자열 strfilename) {

 using (ZipFile zip = new ZipFile()) 
     { 
      zip.AddDirectory(sourceDirectory,zipPath); 

     } 

    } 

답변

0

시도 같은 SevenZipSharp 사용하기 :

SevenZipCompressor compressor = new SevenZipCompressor(); 
compressor.CompressDirectory(...); 
관련 문제