C# 请教WinForm程序实现视频文件的上传! 在WinForm程序中,怎么实现视频文件的上传到服务器端,能给些启示或代码之类的,谢谢了! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 baidu webclient 上传 /// <summary>目录strSrc到指定目录strDest /// /// </summary> /// <param name="strSrc">导出的目录</param> /// <param name="strDest">指定的目录</param> public string Rar(string strSrc, string strDest) { Process p = new Process(); string cmd = String.Format("a -en -ep1 {0} {1} ", "\"" + strDest + "\"", "\"" + strSrc + "\""); string cmd1 = String.Format("a -en -ap{0} -ep {1}", "新的文件", "\"" + strDest + "\""); try { for (int k = 0; k < 2; k++) { p.StartInfo.FileName = Application.StartupPath + "\\Rar.exe"; if (k == 0) { p.StartInfo.Arguments = cmd; } else { for (int i = 0; i < 3; i++) { if (TestG[i] != null) { if (TestG[i].Paper != null) { cmd1 = cmd1 + " \"" + 文件 + "\""; for (int j = 0; j < Count; j++) { if (TestG[i].Paper.part(i) != null) { cmd1 = cmd1 + " \"" + 文件 + "\""; } } } } } } p.StartInfo.Arguments = cmd1; } p.StartInfo.WindowStyle = ProcessWindowStyle.Hidden; p.Start(); p.WaitForExit(); p.Close(); } if (Directory.Exists(Application.StartupPath + "\\Temp")) { Directory.Delete(Application.StartupPath + "\\Temp", true); } return "压缩完成"; } catch (Exception) { return "压缩失败"; }需要windows里的RAR.exe文件 拷贝到工程中 http://www.cnitblog.com/hj627/articles/10939.htmlwinform上传下载 webclient.uploadfile或ftpwebrequest上传文件 请问函数public string Rar(string strSrc, string strDest)里面的TestG[i]是在什么的,能吧代码贴出来吗? 如何将几个数字进行搭配相加,得出全排列组合。 Devexpress中 GridControl,行中的事件怎么弄? 如何像窗体一样能在运行时用鼠标改变panel大小 C#和系统日期时间问题,急急急! 高手帮助看看为什么数据不能保存到服务器上 求一数字判断正则表达式 干净环境vs2005安装问题? 关于定制属性问题???? ACCESS多线程问题 发现了有趣的现象,请问为什么??? 那里有devexpress的学习资料 能否转换成DataGridViewCheckBoxColumn ??
///
/// </summary>
/// <param name="strSrc">导出的目录</param>
/// <param name="strDest">指定的目录</param>
public string Rar(string strSrc, string strDest)
{
Process p = new Process();
string cmd = String.Format("a -en -ep1 {0} {1} ", "\"" + strDest + "\"", "\"" + strSrc + "\"");
string cmd1 = String.Format("a -en -ap{0} -ep {1}", "新的文件", "\"" + strDest + "\"");
try
{
for (int k = 0; k < 2; k++)
{
p.StartInfo.FileName = Application.StartupPath + "\\Rar.exe";
if (k == 0)
{
p.StartInfo.Arguments = cmd;
}
else
{ for (int i = 0; i < 3; i++)
{
if (TestG[i] != null)
{
if (TestG[i].Paper != null)
{
cmd1 = cmd1 + " \"" + 文件 + "\"";
for (int j = 0; j < Count; j++)
{
if (TestG[i].Paper.part(i) != null)
{ cmd1 = cmd1 + " \"" + 文件 + "\""; }
}
}
}
}
} p.StartInfo.Arguments = cmd1;
}
p.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
p.Start();
p.WaitForExit();
p.Close(); }
if (Directory.Exists(Application.StartupPath + "\\Temp"))
{
Directory.Delete(Application.StartupPath + "\\Temp", true);
}
return "压缩完成";
}
catch (Exception)
{
return "压缩失败";
}需要windows里的RAR.exe文件 拷贝到工程中
winform上传下载
或ftpwebrequest上传文件
TestG[i]是在什么的,能吧代码贴出来吗?