| Previous | Next |
| QUERY_E_INVALID_DIRECTORY | QUERY_S_NO_QUERY |
QUERY_E_DIR_ON_REMOVABLE_DRIVE
The query directory is on removable media
QUERY_E_DIR_ON_REMOVABLE_DRIVE is HRESULT 0x8004160B. Windows documents it as “Specified directory is on a removable medium.”
Legacy API stage
This result belongs to legacy Windows query execution and is returned while classifying the volume that backs an otherwise resolved directory scope. The exact condition is: a legacy media-policy restriction rather than path syntax or ordinary file-access failure.
Why it appears
A failed command or empty rowset is only the visible symptom; it does not identify which restriction, projection, sort, scope, timeout or catalog state violated the query contract.
Developer evidence
- Associate volume GUID with the exact UTC timestamp and correlation identifier.
- Compare failing and known-good values for drive type under the same provider or handler version.
- Record the source and normalization path of mount history, not only its display form.
- Record fixed-volume control scope before releasing the relevant objects.
- Associate provider command text and dialect with the exact UTC timestamp and correlation identifier.
Redact private literals if necessary, but keep clause boundaries, canonical properties, parameter types, dialect and parser or provider offsets.
Disciplined troubleshooting
- Capture volume GUID and drive type at the call boundary that returns this result.
- Confirm the operation reached classifying the volume that backs an otherwise resolved directory scope with the intended mount history.
- resolve the current volume GUID and drive type instead of trusting a remembered drive letter.
Begin with a known-good minimal command against the same catalog and restore projection, restriction, sorting, grouping and scope one component at a time.
Retry conditions
Move the searchable scope to supported fixed/cataloged storage or use another search mechanism. Backoff helps only with measured transient load or timeout; it cannot repair invalid clauses, projection metadata, scopes or command state.
Misleading assumptions
It does not by itself prove catalog corruption, service outage, access denial or absence of matches; the query stage and provider records must identify the failing clause or state.
Related query outcomes
QUERY_E_INVALID_DIRECTORY means the directory identifier is invalid; this value means resolution reached removable-media classification.
Developer and administrator guidance
Retain final command text, dialect, catalog generation, parameter values, timeout, cancellation state and chained OLE DB error records. Before rebuilding the catalog or restarting the provider, reproduce the minimal command and preserve its chained errors.
Concrete troubleshooting case
A saved E: scope begins pointing to a USB archive after drive reassignment. Volume-aware validation sends the user to a supported indexed location.
Official Microsoft references
Looking for a different code? Search another status or error code.