• c# asp.net 解压rar文件


     Process cmdProcess = null;
                    Process unzipProcess = null;

                    try
                    {
                        cmdProcess = new Process();
                        cmdProcess.StartInfo.UseShellExecute = false;
                        cmdProcess.StartInfo.RedirectStandardInput = true;
                        cmdProcess.StartInfo.RedirectStandardOutput = true;
                        cmdProcess.StartInfo.RedirectStandardError = true;
                        cmdProcess.StartInfo.CreateNoWindow = true;
                        cmdProcess.StartInfo.FileName = "cmd.exe";
                        cmdProcess.Close();
                        cmdProcess.Dispose();
                        cmdProcess = null;

                        unzipProcess = new Process();
                        unzipProcess.StartInfo.FileName = "C:/Program Files/WinRAR/WinRAR.exe";
                        unzipProcess.StartInfo.Arguments = " x -inul -y " + magazineLocal + " " + maNoLocalFold ;//解压的文件和解压到的地方
    ;
                        unzipProcess.Start();
                        while (!unzipProcess.HasExited)
                        {
                        }
                    }
                    catch (Exception ex)
                    {
                        throw ex;
                    }
                    finally
                    {
                        unzipProcess.Close();
                        unzipProcess.Dispose();
                        unzipProcess = null;
                    }

    本文使用Blog_Backup未注册版本导出,请到soft.pt42.com注册。

  • 相关阅读:
    3、Java基础类
    2、面向对象
    1、Java基础
    0.Eclipse
    【Python】UI自动化-1
    【Python】爬虫-2
    【Python】爬虫-1
    【Python】socket编程-3
    【Python】socket编程-2
    【Python】socket编程-1
  • 原文地址:https://www.cnblogs.com/zjypp/p/2319521.html
Copyright © 2020-2023  润新知