Rss & SiteMap
Foxtable(狐表) http://www.foxtable.com
If filesys.FileExists("\\NTHS-369\扫描文件\Image_00001.jpg")
Then
Dim fileName3 As String = "HSKT" &
DateTime.Now.ToString("yyyyMMddHHmmss")
& ".jpg"
FileSys.CopyFile("\\NTHS-369\扫描文件\Image_00001.jpg","\新建文件夹\HSKT" & DateTime.Now.ToString("yyyyMMddHHmmss") &
".jpg")
Dim piv As WinForm.PictureViewer = e.Form.Controls("PictureViewer1")
Dim piv As WinForm.PictureViewer =
e.Form.Controls("PictureViewer1")
Dim Files As List(of String) =
piv.FtpClient.SelectFile()
For Each File As String In Files
'piv.AddFile(File)
Next
End If 点击后 打开ftp管理器再选择图片上传 我想点击就直接上传 不用打开ftp管理器 同时在
用:按钮上传,比如这样
Dim dlg As New openFileDialog '定义一个新的SaveFileDialog
dlg.MultiSelect = True
If dlg.showDialog = DialogResult.Ok Then '如果用户单击了确定按钮
Dim ftp1 As new ftpclient
ftp1.host="127.****.0"
ftp1.Account = "ft***"
ftp1.password = "1****"
Dim r As Row = Tables("计量产值统计表").Current
Dim ls = r.DataRow.Lines("附件")
For Each f As String In dlg.FileNames
Dim d As String = Format(Date.Today ,"yyyyMM") '格式化日期为202103
Dim file = "/计量产值管理/" & r("项目名称") & "/" & d & "/" & filesys.GetName(f)
If ftp1.DirExists("/计量产值管理/" & r("项目名称")) = False Then
ftp1.MakeDir("/计量产值管理/" & r("项目名称"))
End If
If ftp1.DirExists("/计量产值管理/" & r("项目名称") & "/" & d) = False Then
ftp1.MakeDir("/计量产值管理/" & r("项目名称") & "/" & d)
End If
Dim Result As DialogResult
If ftp1.FileExists(file) Then
Result = MessageBox.Show("文件已经存在,是否覆盖?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
End If
If result = Nothing OrElse result = DialogResult.Yes Then
If ftp1.Upload(f,file,True) = True Then
If ls.contains(file) = False Then
ls.add(file)
End If
Else
MessageBox.Show( f & "上传失败" ,"提示" ,MessageBoxButtons.OK,MessageBoxIcon.Question)
End If
End If
Next
r.DataRow.lines("附件") = ls
ftp1.Close
End If
未能找到文件“I:\ygtp20220526021831.jpg”。”代码要怎样写才能正常
下载信息 [文件大小: 下载次数: ] | |
点击浏览该文件:新建文本文档.txt |