dos command for finding a folder?

I know how to find files

dir *bla*.xls /s

How do I find a folder from dos?  Is there a way?
Who is Participating?
pjamConnect With a Mentor Commented:
DOS or command prompt?
Directory should be same as file, do a DIR directroy name /s
This should help out:
that command will bring up folders too.
oBdAConnect With a Mentor Commented:
Nearly the same way, just add "/a:d" to tell the dir cmd to list directories. Add "/s" to search subfolders as well:
dir /a:d *bla*
dir /a:d /s *bla*
Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

btdownloads7Connect With a Mentor Commented:
It will work the same way, but you have to use the wildcard, otherwise it will show you the contents of the folder, not search for it. You can also use the /ad switch to narrow your results to the folders only. For example, to search for a folder called "desktop", here's the command:

dir /ad /s desktop*
Gavincr001Connect With a Mentor Commented:
You can use

Dir folder name.

If you end with a . It will only show folders, also use /s for subfolders
subhashchyConnect With a Mentor Commented:
C:\Users\Subhash-Chandra>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]

              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

 /S          Displays files in specified directory and all subdirectories.

i would use

C:\Users\Subhash-Chandra>dir tes* /s /b /A:D

output = C:\Users\Subhash-Chandra\test

Open in new window

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.

All Courses

From novice to tech pro — start learning today.