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
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
Summary: Hi friends, I want to write a small program that searches in document files for a specific phrase or sentences. ( like 'Find files' in windows explorer). However I am unable to search in PDF files? H...
Summary: Team, Every day we get some bunch of .txt files. I want to search into a log files(*.txt) for a string DONE, with help of Dos script. Could you please help me in this. How to search for DONE keyword i...
Summary: I may not be using the code correctly. GetPath.html ----- is the file that has the directory that I am trying to obtain GetPath.txt ---- Is where I want the obtained dir c:\program files\program\f...