Urgently looking for a VB Script

  • Thread starter Thread starter Elmo
  • Start date Start date
E

Elmo

Guys,

Im trying to look for a VBScript that will pull out the
words "Warning", "Error", and "Aborted" from a 12mb text
file. I have tried everything. Can someone help please.

And transfer it to a blank text file.

Will love it if someone could help.
 
Elmo said:
Guys,

Im trying to look for a VBScript that will pull out the
words "Warning", "Error", and "Aborted" from a 12mb text
file. I have tried everything. Can someone help please.

And transfer it to a blank text file.

Will love it if someone could help.

Does it have to be a VBScript?

What exactly do you mean by 'pull out the words'? Do you
mean copy from the original file every line that contains
one or more of these words? Or perhaps modify the original
file by *removing* each of these words from it? Or removing
any line from the original file that contains one or more of
these words?

Transfer 'it' to a blank text file? What is 'it'? Each word?
Each line that contains one or more of the words? And of
course the resultant text file will certainly not be 'blank'.
 
I'll tell you exactly what I wanted to do.

I have a text file that gets generated whenever the back
up disk backs up the server.



Recently there has been some problems backing up the
system, and with some searching I looked at this great
big 12 mb text file and found that the problems are
mentioned in that .txt file.



So what I wanted the Script to do (Java, Perl, Vb,
Whatever) is to gather all the lines with the
words "warning", "error", and "abort" so only they would
appear, so its easy to trouble shoot.



I hope you know what I mean.



Eg. of lines in log file.



6.1 IR Overview.doc 20480
02/04/02 15:16

6.10 Confidentiality ... 22016
04/04/02 11:56

6.10 Warning Signals ... 35840
19/03/02 11:28

6.11 Unfair Dismissal... 24064
02/04/02 16:19

6.2 VIC Employee Rela... 27136
02/04/02 15:17
 
Rami said:
I'll tell you exactly what I wanted to do.

I have a text file that gets generated whenever the back
up disk backs up the server.



Recently there has been some problems backing up the
system, and with some searching I looked at this great
big 12 mb text file and found that the problems are
mentioned in that .txt file.



So what I wanted the Script to do (Java, Perl, Vb,
Whatever) is to gather all the lines with the
words "warning", "error", and "abort" so only they would
appear, so its easy to trouble shoot.



I hope you know what I mean.



Eg. of lines in log file.



6.1 IR Overview.doc 20480
02/04/02 15:16

6.10 Confidentiality ... 22016
04/04/02 11:56

6.10 Warning Signals ... 35840
19/03/02 11:28

6.11 Unfair Dismissal... 24064
02/04/02 16:19

6.2 VIC Employee Rela... 27136
02/04/02 15:17

findstr /i "warning error abort" c:\yourpath\yourfile.txt
 
Back
Top