• 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注册。

  • 相关阅读:
    AJAX封装(IE)
    CSS3线性渐变
    [Kafka] [All about it]
    [Java][内存模型]
    [python] [Jupyter Notebook]
    [Paper][Link note]
    [TODO]
    [Java] [Singleton] [DCL][happens-before]
    [Java concurrent][Collections]
    Unity AssetBundles and Resources指引 (四) AssetBundle使用模式
  • 原文地址:https://www.cnblogs.com/zjypp/p/2319521.html
Copyright © 2020-2023  润新知