ftp 上传文件 删除文件类
调用例子 private FtpClientService ftpClient; protected void Page_Load(object sender, EventArgs e) { ftpClient = new FtpClientService(); string soucepath = Server.MapPath("zippath") + "\\99.zip"; //上传文件(上传99.zip文件到a目录下) ftpClient.UploadFile(soucepath, new Uri("ftp://ip/a/"), 0, WebRequestMethods.Ftp.UploadFile); // 删除98.zip文件 string deltefile = "98.zip"; ftpClient.DeleteFileName(deltefile ,new Uri("ftp://ip/a")); //创建999文件夹 string dirname = "999"; ftpClient.MakeDir(dirname, new Uri("ftp://ip/a")); }
用户评论