坎是跨过去的不是望过去的。

怎样在给定的目录下获取其所有的子文件

上一篇 / 下一篇  2011-11-27 12:01:22 / 个人分类:QTP

'设定指定目录
FolderPath = "d:\iQuickTest"'创建fso组件
Set fso = CreateObject("scripting.filesystemobject")
'获取指定目录的文件夹
Set oFolder = fso.GetFolder(FolderPath)
'获取指定文件夹下的所有文件
Set oFiles = oFolder.Files

For Each f In oFiles
MsgBox f.Name
Next

'释放对象
Set f = Nothing
Set oFiles = Nothing
Set oFolder = Nothing
Set fso = Nothing


TAG:

 

评分:0

我来说两句

日历

« 2024-04-30  
 123456
78910111213
14151617181920
21222324252627
282930    

数据统计

  • 访问量: 30323
  • 日志数: 50
  • 建立时间: 2011-07-13
  • 更新时间: 2012-08-25

RSS订阅

Open Toolbar