File Explorer Search - can find files if searched from the main folder but not if seached from the sub-folder

OSHM 5 Reputation points
2025-06-03T11:59:09.48+00:00

Hi,

I have some PDF files in the subfolder C:\Users\Me\Documents\Main\Sub

Using Windows File Explorer, while I am in the "C:\Users\Me\Documents\Main" main folder, if I perform a search by content (a word), File Explorer finds and lists the PDF files that have the content (word) that I searched for.

However, if I navigate into the subfolder "Sub" (C:\Users\Me\Documents\Main\Sub), where those PDF files are actually located, and perform the same search, this time File Explorer cannot find the same PDF files that contain the content (word) I searched for.

PDF iFilter is installed.

Windows 22H2 (OS Build 19045.5917)

What could be the reason for that weird behaviour?

Thank you.

Hakan

Windows 10 Setup
Windows 10 Setup
Windows 10: A Microsoft operating system that runs on personal computers and tablets.Setup: The procedures involved in preparing a software program or application to operate within a computer or mobile device.
2,064 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Allison yang 250 Reputation points Microsoft External Staff
    2025-06-05T08:45:43.9733333+00:00

    Hello, OSHM

    The behavior you describe is indeed a bit strange, but it is not uncommon in Windows File Explorer, especially when searching PDF content indexes. Your current system has PDF iFilter installed, which is good, but we need to check a few key points to resolve the problem:

    Possible Causes & Fixes:

    1. The Subfolder Is Not Indexed

    Even though the parent folder is indexed, Windows Search might not have included the Sub folder specifically. Windows Search behaves differently when searching within a folder that’s not indexed, even if its parent is.

    How to Fix:

    Open Control Panel > Indexing Options.

    Check if this path is included:

    C:\Users\Me\Documents\Main\Sub

    If not, click Modify and manually add it.

    Then click Advanced > Rebuild Index (optional but recommended).

    Note: Rebuilding the index may take time depending on the number of files.

    1. PDF Files Are Not Properly Indexed
    • Even with PDF iFilter installed, it might not be actively indexing the contents — either due to:
    • Improper configuration, or
    • The PDFs are image-based (e.g., scanned documents), which iFilter can't read.

    How to Check:

    • Right-click one of the problematic PDF files in the Sub folder.
    • Choose Properties > Details tab.
    • Look for a "Content" field — if it's missing or empty, it means Windows Search can't read the file contents.

    Also:

    Go to Control Panel > Indexing Options > Advanced > File Types.

    Search for pdf and ensure:

    It's checked

    It's set to “Index Properties and File Contents”

    1. Explorer View or Cache Glitch

    Windows Explorer sometimes behaves inconsistently across folders — especially if it's cached or the folder type view is different.

    Try:

    • Clearing File Explorer search history:
    • Go to Control Panel > File Explorer Options
    • Click Clear next to "Clear File Explorer history"
    • Try using search syntax explicitly:
    content:yourKeyword
    
    1. Verify Indexing via PowerShell (Optional Advanced Check)

    To verify whether the content is being indexed, you can use PowerShell or a COM object like this:

    $searcher = New-Object -ComObject "Microsoft.Windows.Search.QueryHelper"
    $searcher.QueryContent = "yourKeyword"
    $searcher.QueryWhereRestrictions = "'System.ItemPathDisplay' LIKE '%\\Sub\\%'"
    $searcher.QuerySelectColumns = "System.ItemName, System.ItemPathDisplay"
    $searcher.Execute()
    

  2. Henry Mai 715 Reputation points
    2025-06-05T09:11:04.5766667+00:00

    Hi, I’m Henry, and I want to share some insights on this issue.

    It seems the subfolder is not indexed, whereas the parent folder is. To fix this, follow these steps:

    • Open Control Panel > Indexing Options.
    • Click Modify → Expand the folders and ensure C:\Users\Me\Documents\Main\Sub is checked.
    • Click Advanced > Rebuild Index to refresh the indexing.

    Since you’re using PDF iFilter, it's possible that it only works on indexed locations. If it functions in the Main folder but not in Sub, this suggests the filter is active but only for indexed content.

    1. PDF content search works best when PDF iFilter is installed and the file is indexed (rather than being searched live via File Explorer).
    2. To confirm indexing:
    • In File Explorer, right-click on a PDF file inside Sub.
    • Select Properties > Details.
    • If it says Content is indexed, great! If not, it means the file is skipped during content searches.

    Possible Permissions Issue:

    If Windows Search can't access files in Sub due to NTFS permissions, it won’t index them. Check permissions:

    • Right-click on Sub → Select Properties > Security tab.
    • Ensure both SYSTEM and your user account have read access.

    Hope this helps!


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.