public partial class _Default2 : System.Web.UI.Page{ protected void Page_Load(object sender, EventArgs e) { } protected void Button1_Click(object sender, EventArgs e) { string Path = "c:\\de"; string resultPath = string.Empty; bool rel =false; TimeSpan nowTimeSpan=new TimeSpan(); resultPath=YaSuo(out rel, out nowTimeSpan); ResponseFile(resultPath); } /// <summary> /// 压缩文件 /// </summary> /// <returns>返回压缩后的路径</returns> public string YaSuo(out bool bo, out TimeSpan times) { string rarurlPath = string.Empty; bo = false; //压缩文件 string yasuoPathSave = "c:\\de\\TZ.rar"; string yasuoPath = "c:\\de\\temp"; System.Diagnostics.Process pro = new System.Diagnostics.Process(); pro.StartInfo.FileName = @"C:\Program Files\WinRAR\WinRAR.exe";//WinRAR所在路径 //pro.StartInfo.Arguments = "a " + […]
View Details