Dim ftp1 As New FtpClient
ftp1.Host="192.168.1.7"
ftp1.Account = "adminftp"
ftp1.Password = "1234"
dim bh as string = "\
XM001"
If ftp1.DirExists(bh) = false Then
If ftp1.MakeDir(bh) = false Then
Messagebox.Show("创建目录失败!")
return
End If
End If
Dim flm As WinForm.FileManager = e.Form.Controls("FileManager1")
Dim dlg As new OpenFileDialog
dlg.MultiSelect = True
If dlg.ShowDialog = DialogResult.OK Then
e.Cancel = True
For Each fl As String In dlg.FileNames
dim name as string = bh & "\" & FileSys.GetName(fl)
ftp1.Upload(fl,name)
flm.AddFile(name)
Next
End If