Merry Christmas & Happy 2027! Less downtime. More good times. Celebrating 13 years of sorlavit.com
Skip to content
Sorlavit KimIT Support, Network & Infrastructure Services Let’s talk

ปุ่มแปลไทยจะเปิดบทความผ่าน Google Translate เพื่อแปลอัตโนมัติ โดยคงโค้ดและคำสั่งไว้ตามต้นฉบับ

Windows Commands / IT Support Guides

Find files from Command Prompt with dir

A user may know a filename but not where an application saved it. A scoped search is often faster and less intrusive than searching the entire system drive.

Compiled for Sorlavit Kim · Published · Updated · 1 min read

Environment and inputs: Windows 11 · Command Prompt unless PowerShell is specified

Try the diagnostic command

Use the stated shell and platform. Replace sample domains, addresses, services and paths with values from the system you are authorized to support.

dir "%USERPROFILE%\Documents\*.pdf" /s /b

How to read the result

The pattern selects PDF files under Documents. /s searches subdirectories and /b returns paths without the usual directory headings.

What to do next

Change the pattern and root folder to match the user's report. Confirm the file's modification time and open it with the user before concluding that it is the missing document.

Before you make a change

Managed folders may be redirected to OneDrive or another location. A missing result does not prove deletion; check the application's actual save path and approved recovery options.

Source & further reading

Microsoft Learn — dir

Independently written summary reviewed on 2026-11-01. The example illustrates a possible application; it is not a client case study.

Share this article

Back to results