How to limit File Explorer search to just filenames, not contents?


sparkles

New member
Local time
9:42 PM
Posts
5
OS
Windows 11
  • Newer Windows 11 laptop
  • Files have been indexed
On my old Win 10 machine, I could search name:[string], where [string] is the characters I want to appear somewhere in the filename.

When I try this search syntax now, I get "Working on it..." but nothing ever gets returned.

If I search for just [string], I get all the files that contain that string somewhere in the filename OR contents. Checking or unchecking 'File contents' under 'Search options' doesn't make any difference - I get the same number of hits. That seems wrong, or maybe the 'File contents' toggle is supposed to do something else?

How can I get a list of files that have a string appearing somewhere in the filename regardless of file contents?

TIA for any assistance.
 
Windows Build/Version
25H2 (OS build 26200.6899)

My Computer My Computer

At a glance

Windows 11
OS
Windows 11
Consider using third party software > the results are instantaneous

 

My Computer My Computer

At a glance

Windows 10Intel(R) Core(TM) i7-4800MQ CPU @ 2.70GHz16 GB Total: Manufacturer : Samsung MemoryTyp...NVIDIA Quadro K3100M; Intel(R) HD Graphics 4600
OS
Windows 10
Computer type
Laptop
Manufacturer/Model
HP
CPU
Intel(R) Core(TM) i7-4800MQ CPU @ 2.70GHz
Motherboard
Product : 190A Version : KBC Version 94.56
Memory
16 GB Total: Manufacturer : Samsung MemoryType : DDR3 FormFactor : SODIMM Capacity : 8GB Speed : 1600
Graphics Card(s)
NVIDIA Quadro K3100M; Intel(R) HD Graphics 4600
Sound Card
IDT High Definition Audio CODEC; PNP Device ID HDAUDIO\FUNC_01&VEN_111D&DEV_76E0
Hard Drives
Model Hitachi HTS727575A9E364
Antivirus
Microsoft Defender
Other Info
Mobile Workstation
To clarify a couple points:
  1. It's not that the results are too slow. Other searches in FE are basically instantaneous. Therefore, I believe that indicates the search syntax has a problem. I wouldn't have thought it would change between Win 10 and 11, but something's different and/or wrong.
  2. The number of hits is the same with 'File contents' checked AND with 'File contents' unchecked, tends to support my theory that either that particular search syntax has changed, or there's some other setting or issue at play.
  3. I'm looking for a solution in File Explorer and not via third-party apps.
 

My Computer My Computer

At a glance

Windows 11
OS
Windows 11
I've just re-tested
name:~=most
and it finds filenames containing most [most and almost] yet does not find file contents containing most or almost.
The ~= [together] is the symbol in File explorer search that makes it pick up both most and almost.
Win11 test folder.webp - Win11 test results.webp


Denis
 
Last edited:

My Computer My Computer

At a glance

Windows 11 Home x64 Version 25H2 Build 26200....
OS
Windows 11 Home x64 Version 25H2 Build 26200.8037
What's the "=" in the string doing?

I just tried that syntax with a search and it did work. I guess they did change the syntax, which was both unnecessary and annoying that it's not clearly posted info. I'll try it a few more times, but it seems this will get me the search functionality I want. Thank you.

Denis/Try3, can you also tell me how to make the File Explorer menus look that way? It looks the way it did on my old Win 10 machine. On my Win 11 machine it looks like the image here: File Explorer in Windows - Microsoft Support.

I especially don't like the way the left sidebar functions, but your screenshot doesn't seem to have a sidebar at all, so I'm not sure if there are settings to get it to look and function more like Win 10 File Explorer, which I'd prefer.
 

My Computer My Computer

At a glance

Windows 11
OS
Windows 11
What's the "=" in the string doing?
Sorry. I've corrected my post - it's both of the symbols together ~= that make it pick up partial words [most & almost]
The ~= [together] is the symbol in File explorer search that makes it pick up both most and almost.

I guess they did change the syntax
It's the same in Windows 10.
Whilst I did study some soul-destroying MS documents years & years ago, my current knowledge about File explorer search is just what I've picked up in these forums.

can you also tell me how to make the File Explorer menus look that way?
Restore Classic File Explorer with Ribbon - ElevenForumTutorials

your screenshot doesn't seem to have a sidebar at all
I cropped my pictures to show just the things necessary for the point I was making.
By "sidebar", I think you mean the Navigation pane.
Show or Hide File Explorer Navigation Pane - ElevenForumTutorials


All the best,
Denis



Welcome to ElevenForum.

It's really worth making time to browse through the ElevenForum Tutorial index - there's a shortcut to it at the top of every ElevenForum page [within the Tutorials dropdown list].
- At the foot of the ElevenForum Tutorial index is a shortcut to download it as a spreadsheet.
- I download a new copy each month.
- By downloading it as a spreadsheet I can benefit from Excel's excellent filtering capabilities when I search for topics of interest.
- ElevenForum tutorials are also listed at Tutorials and there's a shortcut to that at the top of every page.

You can search ElevenForum using the search box in the top-right corner of all ElevenForum webpages or using Advanced Search - ElevenForum
- You can also search ElevenForum threads in many general search engines, such as Google, by adding site:elevenforum.com after your search term. For example,
Taskbar setup site:elevenforum.com
- [This is what the search box in the top-right corner of ElevenForum webpages does automatically]
 

My Computer My Computer

At a glance

Windows 11 Home x64 Version 25H2 Build 26200....
OS
Windows 11 Home x64 Version 25H2 Build 26200.8037
Sorry. I've corrected my post - it's both of the symbols together ~= that make it pick up partial words [most & almost]

It's the same in Windows 10.
That syntax might also work in Win 10, but I've only ever used
name:most
in Win 10 for the same results and it's shorter and easier to type.

Thanks for the other tips/info.
 

My Computer My Computer

At a glance

Windows 11
OS
Windows 11
Consider using third party software > the results are instantaneous

I've been using this for years, it's lightning fast. You can also search contents with it, but that's obviously slower.
 

My Computers My Computers

  • At a glance

    Win 11 Pro 25H2, Build 26200.8894Intel Core i5 1450064GB DDR4GeForce RTX 4060
    OS
    Win 11 Pro 25H2, Build 26200.8894
    Computer type
    PC/Desktop
    Manufacturer/Model
    Home Brew
    CPU
    Intel Core i5 14500
    Motherboard
    Gigabyte B760M G P WIFI
    Memory
    64GB DDR4
    Graphics Card(s)
    GeForce RTX 4060
    Sound Card
    Chipset Realtek
    Monitor(s) Displays
    LG 45" Ultragear, Acer 24" 1080p
    Screen Resolution
    5120x1440, 1920x1080
    Hard Drives
    Crucial P310 2TB 2280 PCIe Gen4 3D NAND NVMe M.2 SSD (O/S)
    Silicon Power 2TB US75 NVMe PCIe Gen4 M.2 2280 SSD (backup)
    Crucial BX500 2TB 3D NAND (2nd backup)
    Seagate 4TB Ironwolf, rotating HDD archive files
    External off-line backup Drives: 2 NVMe 4TB drives in external enclosures
    PSU
    Thermaltake Toughpower GF3 750W
    Case
    LIAN LI LANCOOL 216 E-ATX PC Case
    Cooling
    Lots of fans!
    Keyboard
    Microsoft Comfort Curve 2000
    Mouse
    Logitech G305
    Internet Speed
    Verizon FiOS 1GB
    Browser
    Firefox
    Antivirus
    Malware Bytes & Windows Defender Security
  • At a glance

    Win 11 Pro 25H2, Build 26200.8894Intel Core i5 1440032GB DDR5Intel 700 Embedded GPU
    Operating System
    Win 11 Pro 25H2, Build 26200.8894
    Computer type
    PC/Desktop
    Manufacturer/Model
    Home Brew
    CPU
    Intel Core i5 14400
    Motherboard
    Gigabyte B760M DS3H AX
    Memory
    32GB DDR5
    Graphics card(s)
    Intel 700 Embedded GPU
    Sound Card
    Realtek Embedded
    Monitor(s) Displays
    27" HP 1080p
    Screen Resolution
    1920x1080
    Hard Drives
    Crucial P310 2TB 2280 PCIe Gen4 eD NAND PCIe SSD
    Samsung EVO 990 2TB NVMe Gen4 SSD
    Samsung 2TB SATA SSD
    PSU
    Thermaltake Smart BM3 650W
    Case
    Okinos Micro ATX Case
    Cooling
    Fans
    Keyboard
    Microsoft Comfort Curve 2000
    Mouse
    Logitech G305
    Internet Speed
    Verizon FiOS 1GB
    Browser
    Firefox
    Antivirus
    Malware Bytes & Windows Defender Security
  • Nimo N171 17" Laptop, (Intel i3-1215U, 16GB RAM, 2TB NVMe, Win11 Pro)
    Acemagic Vista Mini PC V1 (Intel N150, 16GB RAM, 1TB NVMe, Win11 Pro)
    HP ENVY h8-1540t, (24GB RAM, 2TB SSD, 2TB HDD, Win11 Pro)
I've only ever used
name:most
in Win 10 for the same results
Not quite the same results.
- You can see my test folder & my search results in my post #4 above.
- Searching with name:most instead does not list the almost useful example.doc file, only the most useful example.doc file.
- Searching with name:~=most lists both of them.
What you search with depends on what you want from any given search.

You asked about
where [string] is the characters I want to appear somewhere in the filename
so I suggested name:~=most as the most appropriate form of the search term
whereas using name:most would instead be searching for
where [string] is the characters I want to appear at the start of words in the filename
If you had asked that second question instead then I would have agreed that name:most was the most appropriate form of the search term.

I searched in Windows 11 File explorer for my post #4.
I get the same results in Windows 10 File explorer.


All the best,
Denis
 
Last edited:

My Computer My Computer

At a glance

Windows 11 Home x64 Version 25H2 Build 26200....
OS
Windows 11 Home x64 Version 25H2 Build 26200.8037
sparkles,

Another similarity with Windows 10 is that, as in TenForums, every man & his dog posts to tell you what their favourite search tool is even though it has little to do with your question:
How can I get a list of files that have a string appearing somewhere in the filename regardless of file contents?


All the best,
Denis
 

My Computer My Computer

At a glance

Windows 11 Home x64 Version 25H2 Build 26200....
OS
Windows 11 Home x64 Version 25H2 Build 26200.8037
Another similarity with Windows 10 is that, as in TenForums, every man & his dog posts to tell you what their favourite search tool is even though it has little to do with your question:
Even if the tool is free, lightweight, and does exactly what he's looking for?
 

My Computers My Computers

  • At a glance

    Win 11 Pro 25H2, Build 26200.8894Intel Core i5 1450064GB DDR4GeForce RTX 4060
    OS
    Win 11 Pro 25H2, Build 26200.8894
    Computer type
    PC/Desktop
    Manufacturer/Model
    Home Brew
    CPU
    Intel Core i5 14500
    Motherboard
    Gigabyte B760M G P WIFI
    Memory
    64GB DDR4
    Graphics Card(s)
    GeForce RTX 4060
    Sound Card
    Chipset Realtek
    Monitor(s) Displays
    LG 45" Ultragear, Acer 24" 1080p
    Screen Resolution
    5120x1440, 1920x1080
    Hard Drives
    Crucial P310 2TB 2280 PCIe Gen4 3D NAND NVMe M.2 SSD (O/S)
    Silicon Power 2TB US75 NVMe PCIe Gen4 M.2 2280 SSD (backup)
    Crucial BX500 2TB 3D NAND (2nd backup)
    Seagate 4TB Ironwolf, rotating HDD archive files
    External off-line backup Drives: 2 NVMe 4TB drives in external enclosures
    PSU
    Thermaltake Toughpower GF3 750W
    Case
    LIAN LI LANCOOL 216 E-ATX PC Case
    Cooling
    Lots of fans!
    Keyboard
    Microsoft Comfort Curve 2000
    Mouse
    Logitech G305
    Internet Speed
    Verizon FiOS 1GB
    Browser
    Firefox
    Antivirus
    Malware Bytes & Windows Defender Security
  • At a glance

    Win 11 Pro 25H2, Build 26200.8894Intel Core i5 1440032GB DDR5Intel 700 Embedded GPU
    Operating System
    Win 11 Pro 25H2, Build 26200.8894
    Computer type
    PC/Desktop
    Manufacturer/Model
    Home Brew
    CPU
    Intel Core i5 14400
    Motherboard
    Gigabyte B760M DS3H AX
    Memory
    32GB DDR5
    Graphics card(s)
    Intel 700 Embedded GPU
    Sound Card
    Realtek Embedded
    Monitor(s) Displays
    27" HP 1080p
    Screen Resolution
    1920x1080
    Hard Drives
    Crucial P310 2TB 2280 PCIe Gen4 eD NAND PCIe SSD
    Samsung EVO 990 2TB NVMe Gen4 SSD
    Samsung 2TB SATA SSD
    PSU
    Thermaltake Smart BM3 650W
    Case
    Okinos Micro ATX Case
    Cooling
    Fans
    Keyboard
    Microsoft Comfort Curve 2000
    Mouse
    Logitech G305
    Internet Speed
    Verizon FiOS 1GB
    Browser
    Firefox
    Antivirus
    Malware Bytes & Windows Defender Security
  • Nimo N171 17" Laptop, (Intel i3-1215U, 16GB RAM, 2TB NVMe, Win11 Pro)
    Acemagic Vista Mini PC V1 (Intel N150, 16GB RAM, 1TB NVMe, Win11 Pro)
    HP ENVY h8-1540t, (24GB RAM, 2TB SSD, 2TB HDD, Win11 Pro)
Even if the tool is free, lightweight, and does exactly what he's looking for?
The OP is already using a tool that does exactly what the OP is looking for.

Even if the tool is free, lightweight, and does exactly what he's looking for?
I would see nothing wrong in somebody trying to make a case for abandoning the current tool if that case addressed the question identified by the OP.
How can I get a list of files that have a string appearing somewhere in the filename regardless of file contents?


Denis
 

My Computer My Computer

At a glance

Windows 11 Home x64 Version 25H2 Build 26200....
OS
Windows 11 Home x64 Version 25H2 Build 26200.8037
I've only ever used
name:most

I was concerned that my post #9 didn't quite explain what I wanted it to explain so I've added an extra para to clarify why I suggested name:~=most instead of merely name:most as the solution to your question.
You asked about
where [string] is the characters I want to appear somewhere in the filename
so I suggested name:~=most as the most appropriate form of the search term
whereas using name:most would instead be searching for
where [string] is the characters I want to appear at the start of words in the filename
If you had asked that second question instead then I would have agreed that name:most was the most appropriate form of the search term.


Denis
 

My Computer My Computer

At a glance

Windows 11 Home x64 Version 25H2 Build 26200....
OS
Windows 11 Home x64 Version 25H2 Build 26200.8037
Denis/Try3, thanks for the additional explanation. In the same spirit, I want to add some possibly clarifying information.

Using the example string of house, on my Win10 machine, "name:house" would give me all files that had "house" anywhere in the filename (correction: at the beginning of the filename or with a space in front of it*), and only files that "house" somewhere in the filename.
* I thought it was returning files with "house" anywhere, but I just double-checked and corrected the above sentence. However, that search syntax worked well enough for all the years I had the Win10 machine; since that one small difference never caused problems for me, I never noticed it.

That same search on my Win11 machine does one of two things: it either fails to do anything at all discernible, or it displays "Working on it..." for as long as I've been willing to wait without ever returning any hits. I cannot see a pattern to which of the two behaviors it will do at any given time.

I would be delighted if the Win11 machine would display the same results as the Win10 machine when I search "name:house". Typing ":~=" is one of the most awkward and irritating key sequences.

Someone suggested there might be an issue with the index, which I suppose might be possible. The Win11 machine is new, and I have configured/customized it probably more than the average user. I can't think of any settings though that could account for this.
 

My Computer My Computer

At a glance

Windows 11
OS
Windows 11
Someone suggested there might be an issue with the index
I sometimes find that Windows has changed my chosen Indexing options and that search results are therefore limited.
I looked into making some automatic method of checking for Indexing option changes but there far too many ifs, buts & maybes involved.
So, instead, I keep a shortcut to the Indexing options dialog handy and I have a look & compare it to a screenshot of the previous options if search results seem curtailed.
The shortcut is
control.exe srchadmin.dll
or
Rundll32.exe shell32.dll,Control_RunDLL srchadmin.dll
I found the latter in a TenForums tutorial and imagine that the first shortcut was also somewhere in them.
Rundll32 Commands List - TenForumsTutorials
This shortcut one of many Windows 10 items that continue to work in Windows 11 so I have not even looked for the equivalent ElevenForum tutorial.
Ere tis
Rundll32 Commands List - ElevenForumTutorials

As you might have gathered from the frequent references in my posts to both Windows 10 & Windows 11, I have tested everything I have written in this thread in both OSes.


All the best,
Denis
 

My Computer My Computer

At a glance

Windows 11 Home x64 Version 25H2 Build 26200....
OS
Windows 11 Home x64 Version 25H2 Build 26200.8037
Back
Top Bottom