Dim ftp1 As New FtpClient ftp1.Host="" ftp1.Account = "" ftp1.Password = "" Dim dlg As New OpenFileDialog dlg.Filter= "文件|*.zip;*.txt;" dlg.MultiSelect = True If dlg.ShowDialog = DialogResult.OK Then For Each file As String In dlg.FileNames Dim ifo As new FileInfo(file) If ftp1.Upload(file,"\shengji\" & Ifo.name,True) = True Then Messagebox.show("上传成功","提示",MessageBoxButtons.OK,MessageBoxIcon.Information) End If Next End If
|