How to force `findstr` to ignore `Cannot open` returns

You can make use of 2>nul:

FINDSTR /SPIN /C:"string" * 2>nul

This will pipe the standard-error stream to null (read more), thus only matches are displayed.

Leave a Comment