Is there a way to produce a directory listing which only returns the first level of folders and none of the sub-folders? This list will then be outputted to a text file.
1 Answer
Actually non-recursive is the standard. If you only want directories, try this:
dir *.
In comparison this will list only directories but recursively:
dir *. /s
-
Brilliant, just what I needed. I also added the /b switch to return the folder names only.– RobNOct 17, 2013 at 10:09