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

Search a Windows text log with findstr

An application log can contain thousands of lines around an incident. Filter for a known literal phrase to narrow the evidence without editing the original log.

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.

findstr /n /i /c:"connection failed" "C:\Support\app.log"

How to read the result

The command prints case-insensitive matches with line numbers. /c keeps the words together as one search string rather than treating them as independent patterns.

What to do next

Open the log around the matching lines and compare timestamps with the user's failure. Retain surrounding context so a later error is not mistaken for the first cause.

Before you make a change

Replace the example path. FINDSTR has encoding and line-length limitations; use a suitable log viewer for large or Unicode-heavy files.

Source & further reading

Microsoft Learn — findstr

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