做了个上传按钮 Dim dlg As new OpenFileDialog If dlg.ShowDialog = DialogResult.OK Then Dim xg As Integer = dlg.FileName.LastIndexOf("\") Dim fname As String = dlg.FileName.SubString(xg + 1) Dim ftp As new FTPClient ftp.Host = "222.172.***.***" ftp.Account = "*****" ftp.Password = "****" ftp.ChangeDir("\UpLoadFile") '进入UpLoadFile Dim fp As String = "\UpLoadFile" If ftp.Upload(dlg.FileName,fp & "\" & fname) = True Then Messagebox.show("上传完成!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information) Else Messagebox.show("上传失败!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information) End If End If
我想实现 上传文件名称改为 服务器系统时间+UserName 然后把 网页下载路径写入 “表A”的“第一列”
就是用窗口的按钮上传文件,在表中的单元格中,点击下载。
|