Share via

Windows Search - search contents for special characters

Anonymous
2014-10-23T02:52:57+00:00

Hi there,

I haven't had any luck searching for this kind of things via the interwebs/googlebing for this (probably because of the "Search" bit...

Anyway, I'm trying to search through folders for XML files containing specific characters, and when I'm searching its apparent that there are a lot of parts of these (INDEXED locations) that are ignored...

eg:

contents:~"Change"

Will NOT return the file that begins:

<ns0:CustomerOrder Action="Change"...

simply searching for "Change" DOES return this file but also returns files that have stuff in it that I don't want...

Searching Action="Change" returns nothing...

Searching CustomerOrder also returns nothing...

What is the secret to including things like - question mark, equals, forward slash, backward slash, braces, brackets, single quote, double quote and so on...?

Windows for home | Windows 10 | Cortana and search

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

  1. Anonymous
    2014-10-23T20:59:41+00:00

    Indexing is not necessary for Search to function.  It is only necessary for using the Libraries feature and to be able to search for files from the Start/Orb Search box, and also to allow changing options for searching specific file types.  Anyway, I did a test just now -- apparently Windows 7 Search does not search contents of xml files for all present text.  I found this link that describes hoops to jump through.  We need to be able to search xml files by plain text searching, not the default special filter MS placed for xml files.

    http://blog.sdbonline.com/2011/09/windows-search-and-xml-files.html

    1 person found this answer helpful.
    0 comments No comments

3 additional answers

Sort by: Most helpful
  1. Anonymous
    2014-11-06T04:52:48+00:00

    Thanks... from reading that I belive that is in fact exactly what is wrong in this situation because I can search for "content" but not any elements or root tags...

    Sadly that does not solve the issue for me because I'm not admin on this PC and therefore can't do the registry thing... tried it at home and I'm pretty sure it works... *sniff*

    Dirty solution tho... yuck... (but well done you for figuring it out!)

    Found this horribly long post on this topic... hope things improve in subsequent versions of windows... in the meantime its hard to "trust" windows search:

    https://social.technet.microsoft.com/Forums/windows/en-US/ecbecc00-f3e7-429f-87cd-8900fc313add/windows-7-search-does-not-return-file-contents-continued?forum=w7itproui

    Meantime, I've found and am trialing "Agent Ransack" free version... I guess we'll see if that helps my situation any... annoying because I really didn't want to have to use another bit of software to get in my way...

    1 person found this answer helpful.
    0 comments No comments
  2. Anonymous
    2014-10-23T11:32:17+00:00

    Hmmm... while your solution kind of works on a TEXT file - the equals sign appears to be an issue...

    I used as a test the same file with extension "XML" and "TXT" and it would discover the contest when it was the TXT but not XML... 

    For some reason it does NOT work for xml files... (perhaps) another deficiency? is it perhaps too tightly tied to a higher level of "metadata"... so it can't see certain tags in an XML file .... maybe...?

    I tried this on Windows 8.1 and it gives you more visual clues about what its matching on and I couldn't find a way to truly get it to work with any kind of "="(equals with) escape sequence... so perhaps your theory is wrong... OR perhaps you MUST NOT have indexing on at all??

    0 comments No comments
  3. Anonymous
    2014-10-23T03:42:26+00:00

    There is a peculiar deficiency with Windows 7 Search, and that is that content searching with special syntax is more limited when searching in indexed folders compared to non-indexed folders.  (I turned off indexing completely long ago.)  Now, to search for symbols in the contents (in non-indexed folders), use ~= in conjunction with quotation marks.  If the searched symbols are themselves quotation marks, then double each desired quotation mark, as in:

    content:~="action=""change"""

    Note:  ~= means match anywhere, while ~ means match entirely but also allow wildcard usage, and = means match entirely but do not allow wildcard usage.  Also, Windows 7 Search can't distinguish uppercase and lowercase.

    0 comments No comments