Foxtable(狐表)用户栏目专家坐堂 → [求助] 搜索指定文件夹中的文件


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

主题:[求助] 搜索指定文件夹中的文件

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


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

FileSys.CopyFile(file, "d:\" & r("订单号").replace("/","-") & "\" & r("产品名称") & ".pdf", True)

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


加好友 发短信
等级:超级版主 帖子:106209 积分:540168 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2019/3/2 14:52:00 [显示全部帖子]


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


加好友 发短信
等级:超级版主 帖子:106209 积分:540168 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2019/3/2 16:44:00 [显示全部帖子]

代码有什么问题,运行有什么错误?

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


加好友 发短信
等级:超级版主 帖子:106209 积分:540168 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2019/3/2 17:15:00 [显示全部帖子]


Dim t As Table = Tables("找找")
For Each r As Row In t.Rows
    For  Each dir As  String In FileSys.GetDirectories("z:\")
        For  Each file  As  String In FileSys.GetFiles(dir)
            If file.EndsWith(".pdf") Then
                If file.EndsWith(r("FshortNumber") & ".pdf") Then
                    ' FileSys.CopyFile(file, "d:\" & r("FbillNo") & "\" & r("FshortNumber") & ".pdf", True)
                    FileSys.CopyFile(file, "D:\administrator\Desktop\Foxtable\查图纸工具\管理项目1\" & r("FbillNo").replace("/","-") & "\" & r("FshortNumber") & ".pdf", True)
                End If
            End If
        Next
    Next
    For  Each file  As  String In FileSys.GetFiles("z:\")
        If file.EndsWith(".pdf") Then
            If file.EndsWith(r("FshortNumber") & ".pdf") Then
                ' FileSys.CopyFile(file, "d:\" & r("FbillNo") & "\" & r("FshortNumber") & ".pdf", True)
                FileSys.CopyFile(file, "D:\administrator\Desktop\Foxtable\查图纸工具\管理项目1\" & r("FbillNo").replace("/","-") & "\" & r("FshortNumber") & ".pdf", True)
            End If
        End If
    Next
Next

 回到顶部