How do I search for the % character


  1. Posts : 1
    windows 10
       #1

    How do I search for the % character


    I would like to name some folders with a unique prefix that makes finding them easier. I chose %C as the folder name prefix.

    In my little test, I created some of these folders, and then attempted to use windows search to pull them all up. I find that windows search doesn't look for the % character. I will find another naming system, but can anybody explain this limitation, and whether there is any method to search for that character? - I don't understand why it doesn't work.

    thanks v much in advance.
      My Computer


  2. Posts : 17,661
    Windows 10 Pro
       #2

    As the name says, special characters are used for various special purposes, for instance the % sign you mentioned is used to mark environment variables. You can try it yourself to see how it works:
    • Type %userprofile% on File Explorer addessbar, hit Enter to open your user folder
    • Type %windir% on File Explorer addessbar, hit Enter to open Windows folder
    • Type %localappdata% on File Explorer addessbar, hit Enter to open Users\Your_Username\Appdata\Local folder
    • Type %appdata% on File Explorer addessbar, hit Enter to open Users\Your_Username\Appdata\Roaming folder

    To search files and folders containing these special characters use filename:*X (filename followed by : and * plus the character you are searching) replacing X with actual character. For instance to find all files and folders with % sign in name, search for filename:*%.

    To find all files and folders with string &Test in file / folder name search for filename:*&Test.

    Kari
      My Computer


  3. Posts : 31,611
    10 Home x64 (22H2) (10 Pro on 2nd pc)
       #3

    kjshort said:
    I would like to name some folders with a unique prefix that makes finding them easier. I chose %C as the folder name prefix... - I don't understand why it doesn't work.
    As Kari explained, % is a special character. Another example of its use is to type this in a command prompt...
    for %n in (3...,2...,1...,zero!) do @echo %n

    Try the $ character instead of %. That should have no such problems. Indeed, it's one that Microsoft themselves use for 'unique' folder names (like the $Windows ones that a windows install uses).
      My Computers


  4. Posts : 41,455
    windows 10 professional version 1607 build 14393.969 64 bit
       #4

    You may be able use third party software to find files on internal and external drives and use the % character. For example on one out of two computers typing % displayed a few files:
    %appdata%
    %temp%

    The software is everything search or search everything. It will index all files on your drives. It displays search results instantaneously. The more characters you type the narrower the search results.
      My Computer


  5. Posts : 2,911
    Windows 10 Pro for the Bro
       #5

    A good third party search app, which is very nice and simple, is called "Everything". (zbook said search everything / everything search. He's referring to this app, it's only one word: Everything)

    By using the app, I just tried searching for the percent sign, and it worked; it found files with the percent sign % in their file name.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 06:21.
Find Us




Windows 10 Forums