• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 401
  • Last Modified:

CMD OutPut Directory Structure - No Files


I'm attempting to use command prompt to output a directory structure -

I've been using

DIR T:\ /S /B /O:GN

Which gives me absolutely everything.

But I don't want to include the files within the directories in the output. I just want the structure of the directory tree.

Is there anyway of doing this in command prompt?

The above generates 60,000 rows, I'd imagine removing the files from the directory tree, would have a massive impact - 500 - 1000 directories.

2 Solutions
Just add /A:D to your options; this will list only entries with the attribute "Directory":
DIR T:\ /A:D /S /B /O:GN
Miguel Angel Perez MuñozCommented:
Try this: dir t:\ /s /b /ad *
garethtnashAuthor Commented:
Thank you both
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Simplify Active Directory Administration

Administration of Active Directory does not have to be hard.  Too often what should be a simple task is made more difficult than it needs to be.The solution?  Hyena from SystemTools Software.  With ease-of-use as well as powerful importing and bulk updating capabilities.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now