FFIND /S, find directory with specified name?

  • This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
How can I get FFIND /S to find a directory with a specified name (and only directories with that specified name)? Below, how do I find "g:\tc17" only?
v:\> ffind /s /a:d g:\tc17

  2 files

v:\> ffind /s /a:d g:\tc17*

  2 files

Charles Dye

Super Moderator
Staff member
May 20, 2008
Albuquerque, NM
I can't claim elegance. But if you want to specify a directory name to search for -- as opposed to a directory name to search in -- I think you must use a wildcard. And if you want a wildspec which can only match one specific filename, then the square brackets it is.
I thought my old standby — using “.” by itself at the end of a filename or directory name — would do the trick. As in: ffind /s /a:d c:\tc17.

Nope. But this did. Go figure:

ffind /s /a:d c:\tc17.*

I’d created c:\tc17 and c:\tc177. The command returned only c:\tc17 and not c:\tc177.