我要需要的是吧 用bbb列做为图片的文件名。 但是给位给的代码好像是 随机生成文件名,想了一下, 是我没有说清楚,所以在此更正一下,试着自己修正了一下,没成功,所以还要虚心向各位前辈学习啊,!!
Dim Val As String
For Each File As String In FileSys.GetFiles("C:\Users\trj\Desktop\图片\")
Dim f As Io.FileInfo = FileSys.GetFileInfo(File)
Dim r As Row = Tables("newmoo_product").addnew
Val = Val & "|" & f.Name
Dim Values() As String
Values = Val.split("|")
For Index As Integer = 0 To Values.Length - 1
' Dim r As Row = Tables("newmoo_product").addnew
r("ppp") = Values(Index)
Next
Dim ftp1 As New FtpClient
ftp1.Host="tangrenjie.net"
ftp1.Account = "ftp"
ftp1.Password = "zhengbe"
ftp1.UTF8 = True
Dim Str1 As String
Str1 = DataTables("newmoo_product").GetComboListString("bbb")
If ftp1.Upload(file, "upfile1\pic\aaa\" & str1 ) = False Then
Messagebox.show("上传失败!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
Return
End If
Next