16

I can't find any .txt, .php, .cs, .html, etc files using the 'search by file content' option in the searchbar in Windows Server 2012 R2.

I can't find the File Service Role.
I can't find the Windows Search service in Services.
I have checked the advanced option "File content".

Glorfindel
  • 4,158

5 Answers5

19

I decided to provide screenshots, as Windows Server features and roles are now in a single interface and it's not obvious where to look.

Step 1. Enable Windows Search Service feature

Step 2. Enable search in contents

7

In the explorer menu

View -> Options -> Change Folder And Search Options
Folder Options -> Search -> Check Always Search File names and Contents ....
4

findstr /S /L /M /C:"DocumentImportClass" .

search file content into folder and sub folders in windows

Vikash
  • 141
-1

1+ for Vikash's command.

I would also add that /I to make it case-insensitive

findstr /S /L /M /I /C:"TextToSearch"

-1

The easiest way that worked for me was to select all the files where you suspect the string to be present, then right click and select open with notepad++. Once all the files are open in different tabs, go to any file tab and do Ctrl+F, type your string and select Find All in All Opened Documents and there you go!