现在需要写一个程序要求就是  有很多文件 如.xls .doc .jpg  .png  .gif  的文件 压缩在压缩包里面
目标:如果压缩包里面 有一个1.xls 的文件   我怎么写程序   去压缩包中找到1.xls这个文件在哪个压缩包中

解决方案 »

  1.   

    可不可以先把压缩文件解压到临时文件夹中,然后取得解压出来的所有文件,遍历,判断。然后删除解压的文件。[DllImport("Unzip32")]
            public extern static int UnZip(int hwnd, string szCmdLine, StringBuilder szOutput, int dwSize);
    public static long ExpandZip(string targetFile, string destFolder)
            {
                string command = "-xsoqq--i \"" + targetFile + "\" \"" + destFolder + "\\\"";
                return UnZip(0, command, new StringBuilder(), 0);
            }
      

  2.   

    http://www.cnblogs.com/terer/articles/1588717.html
    http://www.icsharpcode.net/OpenSource/SharpZipLib/Download.aspx