您的位置:首页 > 其它

遍历文件夹下文件写入文本

2014-04-24 13:16 211 查看
set f=ofso.opentextfile("D:\print.txt",2,true)

f.write a

f.close

msgbox "完成。"

Function TreeIt(sPath)

 on error resume next

 Set oFso = CreateObject("Scripting.FileSystemObject")

 Set oFolder = oFso.GetFolder(sPath)

 Set oSubFolders = oFolder.Subfolders

 Set oFiles = oFolder.Files

 Set qtLibraries = qtApp.Test.Settings.Resources.Libraries

 For Each oFile In oFiles

        a=a & ofile.path & vbcrlf

 Next

 For Each oSubFolder In oSubFolders

  TreeIt(oSubFolder.Path)

  Next

End Function
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐