31

I need find a file in Windows under command line, but receive results as a table. Similar to windowed version of find, where we have last column, displaying location.

dir /s doesn't match this requirement, because it enters each directory and reports this in separate header, leaving file list as usual.

Dims
  • 13,414

3 Answers3

46

You can use where.exe

where /r c:\windows ntoskrnl.exe

or, with wildcards:

where /r c:\windows ntoskr*
24

If the headers are the only problem in your case, use the /B switch. This returns a list of all files matching the filename along with their location.

dir filename.ext /S /B
Pradeep
  • 341
-2

dir filename.* /S /B

Finds all the matches for the string filename. Displays src and include files