Will this work?
part of my code:
...
FINDSTR /m "RC (return code) = 0" "C:\%fileloc%\DDL_Exec_Logs\%filenm%_OFF_Log.txt"
IF %errorlevel% neq 0 (
ECHO Deployment was not successfull. Errors were found!
ECHO Emailing the admin...
start fail_mail_OFF.vbs
GOTO prod
)ECHO Emailing the admin...
start success_mail_OFF.vbs
GOTO prod....
thanks
yes. the following alternatives also would work:
FINDSTR /c /m "RC (return code) = 0" "C:\%fileloc%\DDL_Exec_Logs\%filenm%_OFF_Log.txt"
IF %errorlevel% neq 0 (
ECHO Deployment was not successfull. Errors were found!
ECHO Emailing the admin...
start fail_mail_OFF.vbs
) else (
ECHO Emailing the admin...
start success_mail_OFF.vbs
)and:
FINDSTR /c /m "RC (return code) = 0" "C:\%fileloc%\DDL_Exec_Logs\%filenm%_OFF_Log.txt" && (
ECHO Deployment was not successfull. Errors were found!
ECHO Emailing the admin...
start fail_mail_OFF.vbs
) || (
ECHO Emailing the admin...
start success_mail_OFF.vbs
)ps: add the /C option, or you'll get false positives on partial matches (see: findstr /?)
Thanks, nbrane
Yes (14) | ![]() | |
No (14) | ![]() | |
I don't know (15) | ![]() |