Find File Recursively Under Windows (Dir /S Not Suitable)

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.

4

3 Answers

You can use where.exe

where /r c:\windows ntoskrnl.exe

or, with wildcards:

where /r c:\windows ntoskr*
1

If the headers are the only problem in your case, use the /B switch.

dir filename.ext /S /B

A list of all files matching the filename along with their location is printed.

dir filename.* /S /B

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

2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Alexander Ross

Alexander Ross

Gaming, Esports & Interactive Media Writer

Alexander Ross has covered the video game industry for a decade, writing deep dives on game design, esports tournaments, VR developments, and gaming culture.

Share this article
Twitter Facebook Pinterest