Isso é feito filtrando por atributos.
dir [somedir] /ad
mostrará todas as entradas com o atributo "directory". Também mostra pontos de junção.
De dir /?
:
Displays a list of files and subdirectories in a directory.
DIR [drive:][path][filename] [/A[[:]attributes]] [/B] [/C] [/D] [/L] [/N]
[/O[[:]sortorder]] [/P] [/Q] [/R] [/S] [/T[[:]timefield]] [/W] [/X] [/4]
[drive:][path][filename]
Specifies drive, directory, and/or files to list.
/A Displays files with specified attributes.
attributes D Directories R Read-only files
H Hidden files A Files ready for archiving
S System files I Not content indexed files
L Reparse Points - Prefix meaning not
Do TechNet da Microsoft - Dir :
If you use /a without specifying Attributes, dir displays the names of all files, including hidden and system files.
The following list describes each of the values that you can use for Attributes. Using a colon (:) is optional. Use any combination of these values, and do not separate the values with spaces.
d Directories
h Hidden files
s System files
l Reparse points
r Read-only files
a Files ready for archiving
i Not content indexed files
- Prefix meaning "not"