Foxtable(狐表)用户栏目专家坐堂 → 关于ApplicationPath


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

主题:关于ApplicationPath

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


加好友 发短信
等级:四尾狐 帖子:960 积分:8519 威望:0 精华:0 注册:2016/4/10 14:33:00
关于ApplicationPath  发帖心情 Post By:2023/4/3 10:39:00 [只看该作者]

把某个.dll文件通过ftp下载到ApplicationPath目录时一直提示下载失败且卡住了循环

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


加好友 发短信
等级:超级版主 帖子:107680 积分:547721 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2023/4/3 10:45:00 [只看该作者]


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


加好友 发短信
等级:四尾狐 帖子:960 积分:8519 威望:0 精华:0 注册:2016/4/10 14:33:00
  发帖心情 Post By:2023/4/3 10:57:00 [只看该作者]

For Each file As String In filesys.GetFiles(ApplicationPath)
    If file.Contains("sdtapi.dll") = True Then
        MessageBox.Show("you")
        Else
            MessageBox.Show("no")
    End If 
Next

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


加好友 发短信
等级:超级版主 帖子:107680 积分:547721 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2023/4/3 11:14:00 [只看该作者]

没看到到下载的代码?代码放在什么事件的?能不能一次性把问题描述清楚

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


加好友 发短信
等级:四尾狐 帖子:960 积分:8519 威望:0 精华:0 注册:2016/4/10 14:33:00
  发帖心情 Post By:2023/4/3 11:20:00 [只看该作者]

For Each file As String In filesys.GetFiles(ApplicationPath)
    If file.Contains("sdtapi.dll") = True Then
        MessageBox.Show("you")
        Else
            Dim ftp1 As New ftpclient
ftp1.host = "196.128.143.28"
ftp1.Account = "foxuser"
ftp1.password = "138238110"
If ftp1.Download("sdtapi.dll", ApplicationPath & "sdtapi.dll") = True Then
    Messagebox.show("下载完成!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information)
Else
    Messagebox.show("下载失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information)
End If
    End If 
Next


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


加好友 发短信
等级:四尾狐 帖子:960 积分:8519 威望:0 精华:0 注册:2016/4/10 14:33:00
  发帖心情 Post By:2023/4/3 11:22:00 [只看该作者]

无线的下载失败

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


加好友 发短信
等级:超级版主 帖子:107680 积分:547721 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2023/4/3 11:35:00 [只看该作者]

For Each file As String In filesys.GetFiles(ApplicationPath)
    If file.Contains("sdtapi.dll") = True Then
        return
    End If 
Next
          Dim ftp1 As New ftpclient
ftp1.host = "196.128.143.28"
ftp1.Account = "foxuser"
ftp1.password = "138238110"
If ftp1.Download("sdtapi.dll", ApplicationPath & "sdtapi.dll") = True Then
    Messagebox.show("下载完成!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information)
Else
    Messagebox.show("下载失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information)
End If

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


加好友 发短信
等级:四尾狐 帖子:960 积分:8519 威望:0 精华:0 注册:2016/4/10 14:33:00
  发帖心情 Post By:2023/4/3 11:58:00 [只看该作者]

For Each file As String In filesys.GetFiles(ApplicationPath)
    If file.Contains("sdtapi.dll") = True Then
        Return
    End If 
Next
Dim ftp1 As New ftpclient
ftp1.host = "196.128.143.28"
ftp1.Port = "35"
ftp1.Account =  "foxuser"
ftp1.password = "138238110"
If ftp1.Download("sdtapi.dll", ApplicationPath & "sdtapi.dll") = True Then
   Messagebox.show("下载完成!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information)
Else
   Messagebox.show("下载失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information)
End If
未知编译错误

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


加好友 发短信
等级:超级版主 帖子:107680 积分:547721 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2023/4/3 12:01:00 [只看该作者]

我测试没有问题。

调试技巧:http://www.foxtable.com/webhelp/scr/1485.htm,看哪一句代码出错

 回到顶部