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); }}
asp.net 使用rar生成压缩包
版权声明:本文采用知识共享 署名4.0国际许可协议 [BY-NC-SA] 进行授权
文章名称:《asp.net 使用rar生成压缩包》
文章链接:https://www.skykkk.com/archives1876.html
本站资源仅供个人学习交流,请于下载后24小时内删除,不允许用于商业用途,否则法律问题自行承担。
文章名称:《asp.net 使用rar生成压缩包》
文章链接:https://www.skykkk.com/archives1876.html
本站资源仅供个人学习交流,请于下载后24小时内删除,不允许用于商业用途,否则法律问题自行承担。
相关推荐
- 暂无文章