C#如何把本地的一个文件夹上传到服务器。 做一个winform程序,选择一个文件夹,让后把这个文件夹上传的ftp服务器上,谁做过么 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 ftp服务端和客户端都是你开发的。想怎么存,看你高兴了。你高兴存一个文件夹就存一下。不高兴都存成一个文件也行。 socket通讯就可以了,类似IPMESSAGER. 我有ftp的地址 用户名 和密码我现在能上传单个文件了怎么在服务器上创建文件夹呢?需要保持上传文件夹的目录结构WebRequestMethods.Ftp.MakeDirectory;这个能用么; 问题已经解决,参考资料如下 希望对大家有帮助http://topic.csdn.net/u/20100521/15/4a2d8a78-199f-4ca9-a0ce-73630b0ff123.html /// <summary> /// 在ftp上创建文件夹 /// </summary> /// <param name="ftpser"></param> /// <returns></returns> public bool MakeDir( string ftpser) { try { Uri uri = new Uri(ftpser); //创建和FTP的连接 GetRequest是连接的方法 上面地址里面有 System.Net.FtpWebRequest reqFtp = GetRequest(uri.ToString(), "username","pass"); reqFtp.Proxy = null; reqFtp.Method = WebRequestMethods.Ftp.MakeDirectory; reqFtp.UseBinary = true; FtpWebResponse response = reqFtp.GetResponse() as FtpWebResponse; response.Close(); } catch { return false; } return true; } 跪求大牛前来指点迷津 应该算是异步调用,线程访问控件? 这问题我也不知道怎么定义... 如何连续清空 一个关于OracleDataReader的问题 如何实现下拉框内容的提示功能? 关于MessageBox.Show后按下Tab键的问题? 求助,c# 中调用POWERPOINT的问题,进者有分 一个刷新的问题 一个简单得吓死你的问题。 如何给字符串数组赋值汉字 新手入门,紧急求助:如何得出网络上指定IP地址的计算机的所有的已经开发的Port的列表? 问个关于Enum.parse的用法 如何判断一个Byte数组中是否存在某些连续的数据
我现在能上传单个文件了怎么在服务器上创建文件夹呢?需要保持上传文件夹的目录结构
WebRequestMethods.Ftp.MakeDirectory;这个能用么;
http://topic.csdn.net/u/20100521/15/4a2d8a78-199f-4ca9-a0ce-73630b0ff123.html /// <summary>
/// 在ftp上创建文件夹
/// </summary>
/// <param name="ftpser"></param>
/// <returns></returns>
public bool MakeDir( string ftpser)
{
try
{
Uri uri = new Uri(ftpser);
//创建和FTP的连接 GetRequest是连接的方法 上面地址里面有
System.Net.FtpWebRequest reqFtp = GetRequest(uri.ToString(),
"username","pass");
reqFtp.Proxy = null;
reqFtp.Method = WebRequestMethods.Ftp.MakeDirectory;
reqFtp.UseBinary = true; FtpWebResponse response = reqFtp.GetResponse() as FtpWebResponse;
response.Close();
}
catch
{
return false;
}
return true;
}