求指导。c#压缩文件夹,生成一个压缩文件存放到某个路径下。 c#如何压缩文件夹,生成一个压缩文件存放到某个路径下。注意啊,不是网站上用户点击下载的时候压缩。万分感谢。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 用Process调用压缩软件命令行。 System.IO.Compression.GZipStream 用这个东西。再外加一些自己的代码即可。 ICSharpCode.SharpZipLib.Zip.FastZip zip = new ICSharpCode.SharpZipLib.Zip.FastZip(); zip.CreateEmptyDirectories=true; zip.CreateZip(@ "c:\a.zip ", @ "C:\temp ", true,null); 或调用winrarSystem.Diagnostics.Process Process1 = new System.Diagnostics.Process(); Process1.StartInfo.FileName = "Winrar.exe"; Process1.StartInfo.CreateNoWindow = true; Process1.StartInfo.Arguments = " a -r "+strzipPath+" " + strtxtPath ; Process1.StartInfo.Arguments = " a -ep " + strzipPath + " " + strtxtPath; http://www.cnblogs.com/singlepine/archive/2006/01/06/312475.html 我想直接调用Winrar.exe,最下面两行是什么意思 能帮我解释一下吗我想压缩一个文件夹生成一个.rar文件,下面的代码要做什么修改。很着急,谢谢了。System.Diagnostics.Process Process1 = new System.Diagnostics.Process(); Process1.StartInfo.FileName = "Winrar.exe"; Process1.StartInfo.CreateNoWindow = true; Process1.StartInfo.Arguments = " a -r "+strzipPath+" " + strtxtPath ; Process1.StartInfo.Arguments = " a -ep " + strzipPath + " " + strtxtPath; 关于ArrayList类型转换的问题_java可以为啥c#不行.... 求一正则!!!!! 【江湖救急】读取CSV老是出问题,解决问题全分相送 c#中windows应用程序如何跳转窗体(如何隐藏部分控件) 存储过程异常 数据库的触发器和c#联系??? sql怎么转换成linq C# winform 程序 dataGridView 绑定的 ds数据集怎么设定只显示需要的列? 请教高手,大家帮帮忙。 线程中的回调函数如何获得返回值,请高手开悟,在线等...... 关于线程池 最大线程数的问题 请教大家 急求!Select语句用法
zip.CreateEmptyDirectories=true;
zip.CreateZip(@ "c:\a.zip ", @ "C:\temp ", true,null);
或调用winrar
System.Diagnostics.Process Process1 = new System.Diagnostics.Process();
Process1.StartInfo.FileName = "Winrar.exe";
Process1.StartInfo.CreateNoWindow = true;
Process1.StartInfo.Arguments = " a -r "+strzipPath+" " + strtxtPath ;
Process1.StartInfo.Arguments = " a -ep " + strzipPath + " " + strtxtPath;
我想压缩一个文件夹生成一个.rar文件,下面的代码要做什么修改。
很着急,谢谢了。System.Diagnostics.Process Process1 = new System.Diagnostics.Process();
Process1.StartInfo.FileName = "Winrar.exe";
Process1.StartInfo.CreateNoWindow = true;
Process1.StartInfo.Arguments = " a -r "+strzipPath+" " + strtxtPath ;
Process1.StartInfo.Arguments = " a -ep " + strzipPath + " " + strtxtPath;