注册 登录
编程论坛 JavaScript论坛

求把这个vbs修改为无函数的那种

yuma 发布于 2019-06-29 12:35, 1510 次点击
treeIt("c:\")

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
For Each oFile In oFiles
a=a & ofile.path & vbcrlf
set f=ofso.opentextfile("jl.txt",2,true)
f.write a
f.close
Next
For Each oSubFolder In oSubFolders
TreeIt(oSubFolder.Path)
Next
End Function
0 回复
1