liangx85

读取文件对象

With Application.FileSearch

  .searchSubFolders = false

  .Filename = "*.txt"

  .lookIn = strFolder

  if .Excute() > 0 then

    for i = 1 to .FoundFiles.count

      .FoundFiles(i)           ' 取得文件对象

    next i

  end if

end With

 

  searchSubFolders    False   :   子文件夹文件不取得

                                   True   :    子文件夹一起取得

posted on 2013-12-31 10:56  liangx85  阅读(167)  评论(0编辑  收藏  举报

导航