From Newz, 1 Year ago, written in Visual Basic.
This paste is a reply to Files In Z VBScript from Newz - view diff
Embed
  1. showfolderlist "Z:\"
  2.  
  3. Sub ShowFolderList(folderspec)
  4.     Dim fs, f, f1, fc, s
  5.     Set fs = CreateObject("Scripting.FileSystemObject")
  6.     Set f = fs.GetFolder("Z:\")
  7.     Set fc = f.SubFolders
  8.     For Each f1 in fc
  9.         s = s & f1.name
  10.         s = s &  vbCrLf
  11.     Next
  12.     MsgBox s
  13. End Sub