2

I'm using windows 7.

I have hundreds of PHP files inside a folder, and I want to find all the files that contains a particular word.

I know that the Windows search engine is able to search inside a file, but this feature only works on some very common extensions (like TXT, JS...).

Is it possible to search inside a file with other extensions? (without using any third-party software)

Someone resolved this problem in Indexing Options -> Advanced Options, but on my PC the Advanced button is grayed out:

screenshot

1

1 Answer 1

10

Using the Command Prompt you can use findstr which will search for ASCII characters within any files.

FindStr Microsoft Technet

Example syntax would look like this:

FINDSTR /i /S foobar *.*

This Will return all occurances of the word foobar in all current folders & subfolders regardless of casing

1
  • This was very useful. It's so frustrating in Windows 10, that even if you set up Indexing Options > Advanced > File Types tab > How should this file be indexed? > Index Properties and File Contents correctly with all the file types you require, search inside files simply doesn't work for all the selected file types. On my system this only works for .txt files which is not to much avail. Your approach, on the other hand, does indeed seem to work for all file types.
    – Miqi180
    Commented Mar 19, 2020 at 1:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .