Windows server 2012 R2 and search by file content

07
2014-07
  • Questioner

    I cant find any .txt, .php, .cs, .html, etc using the folder searchbar by content in Windows server 2012 R2.

    I cant find File Service Role. I cant find the windows search service in Services. I have checked the advanced option "File content".

    ¿Ideas?

    Thanks in advance.

  • Answers
  • Mahmut Ali ÖZKURAN

    In the explorer menu

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

  • Related Question

    Trouble trying to use Windows Search to search for file with a question mark in the content
  • jpierson

    It seems that Windows Search is having trouble when I specify a question mark character as the content that I'm searching for within my files.

    I've tried:

    • content:?
    • content:"?"
    • content:"\?"
    • content:\?
    • content:%3f
    • content:"%3f"
    • content:\3f
    • content:"\3f"
    • content:\00\00\00\3F

    but each of these yield no results when I do indeed have files that contain ? within the scope of the search. If I instead search for something like content:happy it will indeed find all files with the phrase "happy" within those same files.

    My assumption is that Windows Search is treating some characters such as the question mark as a special character likely for the purpose of wild card expressions. To test this theory I've also searched for files containing an asterisk * and indeed I have the same issue as when searching for content of question mark. What I'm wondering is whether there is any way to get a search to work where I can search for a literal expression without any type of wildcard matching or at least a way to escape the special characters within the expression.

    By the way I'm using Windows 7 Enterprise.


  • Related Answers
  • Monkerdermatologist

    Try ~=? where ? is the character you are searching for.

  • SgtOJ

    It looks like Microsoft has removed the ability to search just for special characters. In order to search with special characters there must also be a word included with it (Example: Who?). Again, there must be a word, not just a wildcard, with the special character. That is because Windows Search ignores the special characters with the exception of the wildcards?. Per this indows Search Tips and Tricks page, the only wildcards that available within Windows Search are asterisk and question mark. However, it seems that the only one that works is the asterisk. Even when trying its example, s?n, found on the same page page.

    Here is quote from a post on Vista64's Forums: (Source)

    Actually, the problem is a little different. Search is now word-based, not character based. Brackets are considered punctuation by Search, not wild cards. To get meaningful results, queries that contain punctuation must also contain words, a phrase, or a wild card. For example, If I search on this:[*] or this: {*} I get a bunch of files that have a phrase in their file name within brackets, just as I would expect. So give that a try.

  • harrymc

    I do not use Windows Search, but I wonder if it supports escape characters as described in this Microsoft article :

    Using the search Protocol

    If it does, you might try using %3f for the question mark.

  • soandos

    In Windows 7 I had a similar problem only I was trying to search for keywords surrounded by square brackets ("[" was also ignored similar to "?", "(", "]", etc.) within the filename. What worked for me is the following:

    filename:"*[Cumbia]*" OR filename:"*[Reggae]*"

    This would find all my songs which I tagged with the text string [Cumbia] or [Reggae] within the filenames. What I would then do is select all the files and then right click on the selection to invoke the Sendto feature to send all the songs to my music player program (Winamp in this case).

  • KronoS

    Try content: ~="?" or extension: ~="?" or whatever special character you are looking for in the quotations, etc.

  • jpierson

    I've only found a few resources on the search syntax so I'll begin to list them here in hopes of finding one that may provide a solution or at least a workaround for my problem.

    Windows Search: Tips and Tricks

    Windows Search: Advanced Search Options