根据目录是档案管理,再建目录以下代码对吗?
If ftp1.DirExists("\档案管理\修改文件") Then
MessageBox.show("目录已经存在","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
Else
MessageBox.show("目录不存在","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
End If
以下是上传文件的代码,执行没有问题,但是想上传到指定文件夹中就不行了,把黄色代码修改成这个代码就不行 If ftp1.Upload(ProjectPath & "RemoteFiles\" & dr("第六列"),"\abc\ " & dr("第六列")) = True Then
设置ftp时的物理路径是O:\档案管理,不知道是什么原因?
If ftp1.Upload(ProjectPath & "RemoteFiles\" & dr("第六列"),dr("第六列")) = True Then
dr("第七列") = "已上传"
If FileSys.FileExists(ProjectPath & "RemoteFiles\" & dr("第六列")) Then '如果目标文件已经存在
FileSys.DeleteFile(ProjectPath & "RemoteFiles\" & dr("第六列"),2,2) '则删除之
End If
msgbox(1)
'Messagebox.show("上传完成!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
Else
msgbox(2)
'Messagebox.show("上传失败!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
End If