Foxtable(狐表)用户栏目专家坐堂 → FTP下载的问题


  共有2715人关注过本帖树形打印复制链接

主题:FTP下载的问题

帅哥哟,离线,有人找我吗?
有点蓝
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:109728 积分:558356 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2016/10/15 14:37:00 [显示全部帖子]

这个似乎和ftp没有什么关系吧

Dim spath As String = "\\KMCTZD\kmctzd$\档案存储\"
Dim dpath As String = "C:\Users\WC\Desktop\接收下载\"
For Each r As Row In Tables("档案管理_Table3").GetCheckedRows
    If r("归档文件") IsNot Nothing AndAlso FileSys.FileExists(spath & r("归档文件")) Then
        FileSys.CopyFile(spath & r("归档文件"),dpath  & r("归档文件"),True)
        If FileSys.FileExists(dpath & r("归档文件"))  Then
            Messagebox.show("下载完成!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
        Else
            Messagebox.show("下载失败!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
        End If
    Next
Next

 回到顶部
帅哥哟,离线,有人找我吗?
有点蓝
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:109728 积分:558356 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2016/10/15 15:41:00 [显示全部帖子]

Dim spath As String = "\\KMCTZD\kmctzd$\档案存储\"
Dim dpath As String = "C:\Users\WC\Desktop\接收下载\"
Dim errfiles As String
For Each r As Row In Tables("档案管理_Table3").GetCheckedRows
    If r("归档文件") IsNot Nothing AndAlso FileSys.FileExists(spath & r("归档文件")) Then
        FileSys.CopyFile(spath & r("归档文件"),dpath  & r("归档文件"),True)
        If FileSys.FileExists(dpath & r("归档文件")) = False Then
            errfiles &= dpath & r("归档文件") & vbcrlf
        End If
    Next
Next

If errfiles > "" Then
    Messagebox.show("以下下载失败!" & vbcrlf & errfiles  ,"提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
End If

 回到顶部
帅哥哟,离线,有人找我吗?
有点蓝
  3楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:109728 积分:558356 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2016/10/15 16:58:00 [显示全部帖子]

“归档文件”=True?归档文件不文件名称吗

那就上例子测试

 回到顶部
帅哥哟,离线,有人找我吗?
有点蓝
  4楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:109728 积分:558356 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2016/10/17 11:31:00 [显示全部帖子]

Dim spath As String = "\\KMCTZD\kmctzd$\档案存储\"
Dim dpath As String = "f:\" '"C:\Users\WC\Desktop\接收下载\"
Dim errfiles As String
Dim scsFiles As String
For Each r As Row In Tables("档案管理_Table3").GetCheckedRows
    If r.Isnull("归档文件") = False  Then
        For Each file As String In r.DataRow("归档文件").Lines
            If  FileSys.FileExists(spath & file) Then
                FileSys.CopyFile(spath & file,dpath  & file,True)
                If FileSys.FileExists(dpath & file) = True Then
                    scsFiles = scsFiles & file & vbcrlf
                Else
                    errfiles = errfiles & file & vbcrlf
                End If
            Else
                errfiles = errfiles & file & vbcrlf
            End If
        Next
    End If
Next
If scsFiles > "" Then
    Messagebox.show("以下文件下载成功!" & vbcrlf & scsFiles ,"提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
End If
If errfiles > "" Then
    Messagebox.show("以下下载失败!" & vbcrlf & errfiles  ,"提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
End If

 回到顶部
帅哥哟,离线,有人找我吗?
有点蓝
  5楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:109728 积分:558356 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2016/10/17 12:07:00 [显示全部帖子]

Dim spath As String = "\\KMCTZD\kmctzd$\档案存储\"
Dim dpath As String = "f:\" '"C:\Users\WC\Desktop\接收下载\"
Dim errfiles As String
Dim scsFiles As String
For Each r As Row In Tables("档案管理_Table3").GetCheckedRows
    If r.Isnull("归档文件") = False  Then
        For Each file As String In r.DataRow.Lines("归档文件")
            If  FileSys.FileExists(spath & file) Then
                FileSys.CopyFile(spath & file,dpath  & file,True)
                If FileSys.FileExists(dpath & file) = True Then
                    scsFiles = scsFiles & file & vbcrlf
                Else
                    errfiles = errfiles & file & vbcrlf
                End If
            Else
                errfiles = errfiles & file & vbcrlf
            End If
        Next
    End If
Next
If scsFiles > "" Then
    Messagebox.show("以下文件下载成功!" & vbcrlf & scsFiles ,"提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
End If
If errfiles > "" Then
    Messagebox.show("以下下载失败!" & vbcrlf & errfiles  ,"提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
End If


 回到顶部