How do I (recursively) search all file contents in Windows 7? I am using the content:xxx command, in the Search settings box in Windows Explorer, to search xxx in this example. This does not work:
As an example of how this search is broken, I see an org.eclipse.wst.common.component file with text that I am searching for and Windows 7 is not returning it in the results. I assume it’s only searching known text-based file types. How can I make it search all files? I need to find everything I am looking for.
P.S. If there is a DOS-based solution, I will also accept this. Maybe a batch file using dir /s /b and findstr could be constructed.
EDIT: Noted my need for a recursive search.
Here is my three file DOS solution, but I am still looking for a proper Windows 7 solution if anyone has one:
1. search.bat
Searches all files recursively, and runs
process.baton each one.2. process.bat
Prints out the name of each file, in quotes because some files will break the batch file code without, then finds the search string,
search_string_here, and prints out the entire line that the search string is found in.3. output.txt (sample output)
Contains the output, formatted as follows, searching
search_string_herein myproject_nameJava project stored inD:\project_name\, displaying all files searched as well as results if there are some:Above you can see that
search_string_herewas found, full line being<name>search_string_here</name>, inD:\project_name\.projectfile… among other results.Again, I am still looking for a proper Windows 7 solution if anyone has one.
Warning: “Line is too long” Errors; FINDSTR may be buggy:
Apparently, FINDSTR < grep, as if you didn’t know. Here’s an article that dives into the error in FINDSTR that are do not reproduce when the same input is used in a different file: