Foxtable(狐表)用户栏目专家坐堂 → 遍历文件有问题,帮忙看下


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

主题:遍历文件有问题,帮忙看下

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


加好友 发短信
等级:版主 帖子:1693 积分:12117 威望:0 精华:7 注册:2013/7/11 10:52:00
  发帖心情 Post By:2015/2/11 13:36:00 [显示全部帖子]

死循环了

 

 

Functions.Execute("遍历文件",str) '再次循环

 

 

str 应该重新赋值

 

 

试试

 

Dim str As String = Args(0) '非末级目录

If str.Contains("RECYCLE") = False AndAlso str.Contains("System Volume Information") = False AndAlso str.Contains("WINDOWS\Installer") = False AndAlso str.Contains("Microsoft\Feeds") = False _
    AndAlso str.Contains("Microsoft\Installer") = False AndAlso str.Contains("Local Settings\Temp") = False Then
    For Each s As String In FileSys.GetDirectories(str)
        
        If s.Contains("RECYCLE") = False AndAlso s.Contains("System Volume Information") = False AndAlso s.Contains("WINDOWS\Installer") = False AndAlso s.Contains("Microsoft\Feeds") = False _
            AndAlso s.Contains("Microsoft\Installer") = False AndAlso s.Contains("Local Settings\Temp") = False Then
            
            _lst.Add(s)
            Functions.Execute("遍历文件",s) '再次循环
        End If
    Next
    For Each s As String In FileSys.GetFiles(str)
        
        If s.Contains(".ldb") = False And s.Contains(".db") = False Then
            
            _lst.Add(s)
            
        End If
    Next
End If

 回到顶部