Findstr - exclude file type - search only ascii

I want to run the FINDSTR dos command so that it can be found in "findstr /?". How would I run findstr so that it searches only ascii files. (I'm not sure if this is possible. I feel that this is not possible). Also, how would I run this command line to exclude some temporary files. For example, what if I wanted to exclude .psd files

+4
source share
1 answer

What happened to the /P option described in the help?

 /P Skip files with non-printable characters. 

It worked for me.

To further control which files are being viewed, simply iterate over the files using the for loop and add whatever logic you need. To skip .psd files as well as skip binary files:

 for /f "eol=: delims=" %%F in ('dir /ad /b^|findstr /live ".psd"') do findstr /p "search" "%%F" 

Use one percent instead of two percent if it is run from the command line.

+8
source

All Articles