using System.IO.Compression;
string TOZipPath = String.Format(\"~/Static/ZIP/{0}\", DirName); //需要压缩的源文件
string TOZipFilePath = String.Format(\"~/Static/ZIP/{0}\", DirName + \".zip\"); //压缩成新的Zip文件
try
{
ZipFile.CreateFromDirectory(Server.MapPath(TOZipPath), Server.MapPath(TOZipFilePath));
}
catch (Exception ex){}
继续阅读与本文标签相同的文章
-
多路RTSP-RTMP转RTMP官方定制版
2026-05-19栏目: 教程
-
服务器租用价格多少,决定云服务器价格的因素
2026-05-19栏目: 教程
-
企业上云的好处优势告诉你企业为什么要上云?
2026-05-19栏目: 教程
-
阿里云910会员节大促主会场全攻略
2026-05-19栏目: 教程
-
Agentless监控实践中的预警指标采集
2026-05-19栏目: 教程
