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

Articles are written in English. The Thai translation button opens Google Translate; code and commands stay in their original form.

Windows Commands / IT Support Guides

Search a Windows text log with findstr

Use findstr to locate a specific error phrase and its line number in a Windows text log.

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

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

Understand the problem

Choose the application log for the reported incident. Replace the sample path and keep quotes around a path that contains spaces.

Run the command

Run the displayed command. The /n switch adds line numbers, /i ignores letter case, and /c keeps connection failed together as one search phrase.

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

Read the output

An output beginning with 42: means the match is on line 42. Open the log at that line and read the messages immediately before and after it.

Choose the next step

If no lines appear, verify the path and time range. Try a shorter phrase or use a viewer that supports the log’s encoding.

Before making changes

Before sending an excerpt, review it for credentials and personal information. Include the timestamp and the relevant nearby lines.

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 all articles