2

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.

2

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
1
  • Brilliant, just what I needed. I also added the /b switch to return the folder names only. – BobJim Oct 17 '13 at 10:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.