1.

Solve : Excluding files when using dir command?

Answer»

I need to output all the folders within a SPECIFIC directory, including subdirectories. However, I don't want to output all the contents of the directories - I just want the directories and subdirectory names. I know that with the dir command, it will display all files and subdirectories, but is it possible to exclude all the files?

I am not very proficient with dos other than running certain commands and so i don't know if this is even possible.

Nadia
This MAY help:

Code: [Select]
dir /a:d /b /s directoryname
You can eliminate the /b switch and get a slightly DIFFERENT view of the directories.

You can also use the TREE command which makes a cute little GRAPHIC of your directory structure:

Code: [Select]tree directoryname

Hope this HELPS. 8-)the tree command is exaclty what I needed.

Thanks!!



Discussion

No Comment Found