Computing.Net > Forums > Programming > Search Exact string in bat file

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Search Exact string in bat file

Reply to Message Icon

Name: chluk2425
Date: February 20, 2009 at 09:42:22 Pacific
OS: Windows XP
CPU/Ram: 3.8GHz / 3326 MB
Subcategory: Batch
Comment:

hi, i want to make a bat file which will search through the text file, and find a particular word, eg bend
but in my text file, there is another word called: bending which i don't want it to be found

is the a way to make the batch file to search only bend, and return sth, but not bending?

i've tried:
find "bend" mylog.txt

but this will return bending as well....

Thank You



Sponsored Link
Ads by Google

Response Number 1
Name: klint
Date: February 20, 2009 at 09:46:36 Pacific
Reply:

findstr "\<bend\>" mylog.txt


0

Response Number 2
Name: chluk2425
Date: February 20, 2009 at 09:50:07 Pacific
Reply:

thz klint, it solved the problem


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Search Exact string in bat file

Find and replace a string in a file www.computing.net/answers/programming/find-and-replace-a-string-in-a-file/19034.html

Replace String in .bat file www.computing.net/answers/programming/replace-string-in-bat-file/19152.html

nt batch to replace string in srt file www.computing.net/answers/programming/nt-batch-to-replace-string-in-srt-file/19260.html