用c#程序把文件做成压缩包该怎么做?

解决方案 »

  1.   

    你搜索一下ICSharpCode.SharpZipLib.dll
      

  2.   

    我记得微软有一篇用J#的zip类来实现的文章。
      

  3.   

    方法1
    要引用ICSharpCode.SharpZipLib.dll ICSharpCode.SharpZipLib.Zip.FastZip zip = new ICSharpCode.SharpZipLib.Zip.FastZip();
                zip.CreateEmptyDirectories = true;
                zip.CreateZip(BackPath + BackName + "\\" + webname + ".zip", WebPath + webname, true, null);
                backwebmessage.InnerHtml = "成功备份" + webname + "项目^_^";
    方法2就是直接调用
    System.Diagnostics.Process.Start("rar.exe", @"a  -inul -y c:\my.rar c:\myweb");