Hi again,
I see where it all got screwed up from the beginning now.
My original script (from way back) was doing a line-by-line parsing of a FOR command:
--------------------------
FOR /F "SKIP=2 DELIMS=" %%F IN ('rsm view /cg%guiddisplay% /TPhysical_media') DO (
SET LINE=%%F
CALL :PROCESS
)
:PROCESS
ECHO %LINE% | FINDSTR "The command" > NUL
IF ERRORLEVEL 1 (
ECHO %LINE% | FINDSTR "Der Befehl" > NUL
IF ERRORLEVEL 1 (
SET MEDIA=%LINE%
)
)
--------------------------
Which worked because the "ECHO %LINE%" statements were being fed by the "FOR" command.
Sometime later, I screwed up and added the "ECHO %logfile%" instead of using the correct "TYPE %logfile%" syntax. It just grew out of my initial error.
Sorry about that.
pb
Main Topics
Browse All Topics





by: pbarrettePosted on 2005-06-14 at 16:36:47ID: 14216908
Hi omb,
It's been a while. I haven't answered a question on here in a long time.
I actually moved to Germany almost a year ago now..
Anyway, I'm a bit rusty, so it took a while for me to find the mistake.
In your ":CHECKLOGFORERRORS" section, you are using:
ECHO "%LOGDIR%\%LOGFILE%"
That will return the directory path of the logfile every time. The error messages aren't found in the directory path, so the script is bypassing your IF statements.
Instead, you need to change those to:
TYPE "%LOGDIR%\%LOGFILE%"
That will send the contents of the file to your FINDSTR and should then find the error messages.
Hope this helps,
pb