欢迎光临
我们一直在努力

asp.net 使用rar生成压缩包

private void RAR(){     // 把WinRAR目录复制到网站目录下。     string pathRoot = Server.MapPath("/");     string winRAR = pathRoot + "WinRAR/WinRAR.exe";     // 把Job.aspx和Default.aspx这两个文件添加到压缩包Job.rar中     string arguments = @"a Job.rar Job.aspx Default.aspx";        try     {         ProcessStartInfo info = new ProcessStartInfo();         info.FileName = winRAR; // WinRaR.exe目录         info.Arguments = arguments; // 参数         info.WorkingDirectory = pathRoot;         Process p = new Process();         p.StartInfo = info;         p.Start();//启动         Response.Write("压缩成功。");     }     catch (Exception ex)     {         Response.Write(ex.Message);     }}

赞(0)
未经允许不得转载:福利吧|福利社|fuliba » asp.net 使用rar生成压缩包

相关推荐

  • 暂无文章