Windows – How to find a file in cmd and then piping the output in findstr

batchwindowswindows-command-prompt

I have a simple question regarding how to finding a file in cmd and then piping the output to findstr to nail down a specific file.

For example,

dir change /s /p | findstr "error"

Can this be achieved?

Best Answer

two ways:

dir *test* /s/b

dir /s/b | findstr /i "test"