Upload
将文件上传到FTP,语法:
Upload(sourceFileName, destinationFileName, ShowUI)
sourceFileName:要上传的本地文件,含路径
destinationFileName:目标文件,含路径
ShowUI:逻辑型,是否显示上传进度,默认为False。
如果上传成功,返回True,否则返回False
示例
Dim ftp1 As New FtpClient
ftp1.Host="196.128.143.28"
ftp1.Account = "foxuser"
ftp1.Password = "138238110"
If ftp1.Upload("c:\data\Desert.jpg","\update\Desert.jpg") = True Then
Messagebox.show("上传完成!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
Else
Messagebox.show("上传失败!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
End If