How to search for a string in a txt file?

August 10, 2011 at 14:24:45
Specs: Windows 7
I have a batch file that I want for it to search a text file for a specific exact-worded string
The string I am searching for is this:


Following the find command I want to do:
if %ERRORLEVEL% == 1 (set "STATUS=ULPS is enabled") ELSE (set "STATUS=ULPS is disabled")

The problem is, I tried the following:
find ""EnableUlps"=dword:00000000" C:\temp.txt

But it returned 21 other strings in addition to "EnableUlps"=dword:00000000.

I also tried using findstr:
findstr "\<"EnableUlps"=dword:00000000\>" C:\temp.txt

But it returned nothing.

Help is greatly appreciated.

See More: How to search for a string in a txt file?

Report •

August 10, 2011 at 14:42:03
Nevermind, I have reached my original goal but with a different approach.

My goal was to search the registry for a the presence of a value, read its DWORD value (if present), then set an environmental value based on the value (if statement)

Here is the guide I used.

Report •
Related Solutions

Ask Question