Finally, I found a solution to find all files with a specific extension that DO NOT contain a specific string, I searched for a solution for a long time, and it works great and free. Hope this helps others who are trying to do the same.
GOTO EndComment 1st Change source, destination, extension and string to your needs. 2nd Remove ECHO from line 19 (If you want to make a copy of those specific files that contain the string to destination folder) 3rd Save this piece of code on a file file with extension .cmd and run it to get results (just double click on file). :EndComment @echo off setlocal set source=c:\Users\youruseraccount\Documents\Visual Studio 2012\PathofProject\ set destination=c:\foundFilesWithoutString\ set extension=*.aspx.cs set string=Security for /f "tokens=*" %%G in ('dir /s "%source%\%extension%" /a:-d /b') do ( find /c /i "%string%" "%%G" > NUL || ( ECHO copy "%%G" "%destination%" ) ) pause
kami
source share