文件打包成自解压文件怎么实现???

libertysigil 2003-06-27 02:19:09
功能类似Winrar一样,可以把多个文件压缩打包成自解压文件.

怎样在指定的路径创建快捷方式,用什么类实现?????????
...全文
220 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
renlijun 2003-07-26
  • 打赏
  • 举报
回复
在加入浏览框前,必须在html文件<form encType="multipart/form-data"></form>

using System.Diagnostics;
using System.IO;

if(upImageFile.PostedFile!=null) //upImageFile为浏览框的命名,检查浏览中是否有所选的文件;
{
string nam = upImageFile.PostedFile.FileName; //获取文件名;
int i= nam.LastIndexOf("\\"); //取得文件名(包括路径)里最后一个"\\"的索引;
string newext =nam.Substring(i+1); //取得文件及其扩展名;
string newname=Server.MapPath("yjsb_file\\"); //保存文件到所要的目录;
string newname1=newname+newext;
upImageFile.PostedFile.SaveAs(newname1);
string temp;
temp="x -o+ "+newname1+" "+newname; //实现winrar的自解压参数;
string a="\\";
string b="\\\\";
string temp1=temp.Replace(a,b); //取子串;

System.Diagnostics.Process.Start("winrar.exe",temp1); //实现自动解压缩;
}

记着给分呀!

qianli918 2003-07-26
  • 打赏
  • 举报
回复
gz
libertysigil 2003-06-28
  • 打赏
  • 举报
回复
资源文件? 具体怎么用?

ICSharpCode.SharpZipLib.dll
这是。NET的类吗? 怎么用?
xueqt 2003-06-28
  • 打赏
  • 举报
回复
学习
知识2018 2003-06-28
  • 打赏
  • 举报
回复
up
libertysigil 2003-06-28
  • 打赏
  • 举报
回复
资源文件? 具体怎么用?

ICSharpCode.SharpZipLib.dll
这是。NET的类吗? 怎么用?
windinwing 2003-06-27
  • 打赏
  • 举报
回复
ICSharpCode.SharpZipLib.dll
boyaboy 2003-06-27
  • 打赏
  • 举报
回复
资源文件

111,086

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • AIGC Browser
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧