Computing.Net > Forums > Programming > Dos script search in .txt file P-2

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.

Dos script search in .txt file P-2

Reply to Message Icon

Name: vishuonly4u
Date: July 28, 2008 at 21:25:34 Pacific
OS: dos
CPU/Ram: 1gb
Comment:

I got good to know about how to search into the file(Topic : Dos script to search into .txt file) but now I want to ask u one more question about file search.

Team ,
I want to ask u some more in this.
"
for %%f in ("*.txt") do (
echo "%%f" | find %%f /c "<reply>done</reply>"
if !errorlevel! EQU 0 set /a count=count+1
)"
Using this code I am able t count the file where I have this lines.
But now I want to count the files where I dont have this code.
Like :=
<reply>done</reply> is the Positive reply state.
But when we have error (-ve state) during that time we get
<reply>NOT DONE</reply> or
<reply>The error information</reply>

So understand when we have error I am planing to search inside the file for error message... but its not a common .. so I cant put that into the search string pattern.

So I am planing to scan the files which DONT HAVE this lines.
<reply>done</reply>.

I dont know how to do this??
Could you please help me on this



Sponsored Link
Ads by Google

Response Number 1
Name: Mechanix2Go
Date: July 29, 2008 at 01:28:34 Pacific
Reply:

It might help to say which OS.


=====================================
If at first you don't succeed, you're about average.

M2


0
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: Dos script search in .txt file P-2

Searching in .pdf files www.computing.net/answers/programming/searching-in-pdf-files/9255.html

Dos script to search into .txt file www.computing.net/answers/programming/dos-script-to-search-into-txt-file/16695.html

del text in txt file except dir www.computing.net/answers/programming/del-text-in-txt-file-except-dir/17223.html