这样会不会相对合理一些呢
Dim ftp As New FtpClient
ftp.Host="tangrenjie.net"
ftp.Account = "jinzhengbe"
ftp.Password = "Huayin7761"
Dim Result As DialogResult
For Each File As String In FileSys.GetFiles("c:\as\")
If ftp.Upload(file, "/aa/" & FileSys.GetName(file)) = False Then
Result = Messagebox.show(FileSys.GetName(file) & "上传失败!是否继续上传剩余文件?","提示",MessageBoxButtons.YesNo,MessageBoxIcon.Information)
If Result = 6 Then
Continue For
Else
Exit For
End If
End If
Next
If Result = 0 Then
Messagebox.show("上传完成!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
End If