Every kid starts out as a natural-born scientist, and then we beat it out of them. A few trickle through the system with their wonder and enthusiasm for science intact.
In this tip you will learn how to list all folders in a directory.
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFolder = objFSO.GetFolder("\\server1\sharedfolders")
Set objSubFolders = objFolder.SubFolders
For each objSubFolder In objSubFolders
wscript.echo objSubFolder
Next
Open CMD, navigate to your folder that has this vbs file and run cscript.exe filename.vbs.
You could also add | CLIP to copy to the clipboard: cscript.exe filename.vbs | CLIP