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".

migrated from stackoverflow.com Feb 3 '14 at 21:37

This question came from our site for professional and enthusiast programmers.

  • You are right!.. is there anyway i can move it? a simple way? – Fraga Jan 28 '14 at 7:59
  • I am not sure that a user can, but we can ask a mod to help us out. – Tommy Jan 28 '14 at 11:02

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

  • @Ramhound thanks for your review. I've updated the post text – Viacheslav Shchupak Feb 10 '17 at 13:15
  • In which case why not just update the answer with the images rather than leaving a duplicate answer? – Lankymart Apr 10 '17 at 8:34
  • 1
    @Lankymart Does one get points for up-votes on an answer that one only edits rather than posts? I found the screenshots much more helpful than the original answer, which I had already found. – BlueMonkMN Sep 20 '17 at 13:56
  • @BlueMonkMN no, but if that's the end-game with answering, then the StackExchange communities are not for you. – Lankymart Sep 20 '17 at 14:00
  • 1
    @Lankymart The purpose of assigning points is to give proper incentives for desired activities. So of course the scoring of answers should be considered in explaining why people choose a particular course of action. Whether that's one's ultimate motive shouldn't matter much otherwise there's little purpose in assigning points in the first place. Even if points aren't this answerer's motive, I think it's important for them to see how much the screenshots mattered. I suppose this should be discussed on meta.superuser.com instead of here. If another reply is warranted, maybe I'll take it there. – BlueMonkMN Sep 20 '17 at 14:19

In the explorer menu

View -> Options -> Change Folder And Search Options
Folder Options -> Search -> Check Always Search File names and Contents ....
  • 3
    Also check that you have the Windows Search feature installed (in Server Manager). And then check which locations are indexed in File Explorer > Search > Advanced Options > Change indexed locations – bounav Jun 6 '14 at 11:08
  • 1
    @bounav - Of course, look at File Explorer > Search > Advanced Options because that's the obvious place to find the configuration for windows search. Not. Thanks! – davidbak Mar 25 '16 at 3:36

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

search file content into folder and sub folders in windows

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy