Sign up ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

In Windows CMD, I use tree c: /f to get a tree of all directories resided in C:. But now I only want to tree out the only sub-directory folders (not files). How to I exclude files in tree command?

share|improve this question

1 Answer 1

up vote 13 down vote accepted

Leave out the "/F" switch, since it's what causes Files to be included.

From tree /?:

Graphically displays the folder structure of a drive or path.

TREE [drive:][path] [/F] [/A]

   /F   Display the names of the files in each folder.
   /A   Use ASCII instead of extended characters.
share|improve this answer
beat me to it... –  Lamar B Dec 29 '11 at 3:09

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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