大家有没有用过上传并且能自动解压缩的控件,用过的推荐一下,最近急需先谢了

解决方案 »

  1.   

    string Strdir = DirectoryName;//要压缩的文件夹
    string StrdirGoal = Strdir + "\\" + "exam";//压缩包存放位置
    string StrCmd = "a " + " -ep1 -sfx " + StrdirGoal + " " + Strdir;
    string StrRARCmd = Server.MapPath( "" ) + "\\Rar\\Rar.exe ";
    Process.Start( StrRARCmd, StrCmd );
    你把压缩文件考到wwwroot....
    只需要四个文件就可以了
    而且可以压缩文件夹,自动解压。等等。
      

  2.   

    你可以利用服务器端调用winrar来解压string readRoot = @"C:\";
    string filePath = @"C:\files.rar";
    string unZipFolder = @"C:\files\";
    //调用程序WinRAR进行解压
    System.Diagnostics.Process process = new System.Diagnostics.Process();
    //设置执行文件物理存放目录
    process.StartInfo.FileName = readRoot + "WinRAR.exe";
    process.StartInfo.Arguments = " x -inul -y " + filePath + " " + unZipFolder;
    //进行解压
    process.Start();       
     //等待解压的完成
    while(!process.HasExited)          
    {
    }
      

  3.   

    http://blog.csdn.net/johnsuna/archive/2006/05/11/724833.aspx