- WScript.Echo ShowFolderList("c:\")
-
- Function ShowFolderList(folderspec)
- Dim fso, f, f1, s, sf
- Set fso = CreateObject("Scripting.FileSystemObject")
- Set f = fso.GetFolder(folderspec)
- Set sf = f.SubFolders
- For Each f1 in sf
- s = s & f1.name
- s = s & vbCrLf
- Next
- ShowFolderList = s
- End Function
复制代码
|