Anurag_Sharma
12 years agoLevel 3
need help in modifying the subject line
**** Moved to new discussion from https://www-secure.symantec.com/connect/forums/how-exclude-157150-error-blat ****
Yasuhisa Ishikawa,
No Doubts excellent progamming work by you.
I'm one of th...
- 12 years ago
Probably this will work.
@ECHO OFF SETLOCAL ENABLEDELAYEDEXPANSION FOR /F "tokens=5" %%i IN ("%2") DO SET STATUS=%%i SET STATUS=!STATUS:~0,-1! IF "%STATUS%"=="0" GOTO :EOF IF "%STATUS%"=="90" GOTO :EOF IF "%STATUS%"=="150" GOTO :EOF IF "%STATUS%"=="157" GOTO :EOF IF "%STATUS%"=="190" GOTO :EOF FOR /F "tokens=1,2,3,4,5" %%i IN ("%2") DO SET SUBJECT=%%i failed %%j %%k %%l %%m IF "%~4"=="" ( blat %3 -s %SUBJECT% -t %1 -i NetBackup -server smtp.moc.com -q )ELSE ( blat %3 -s %SUBJECT% -t %1 -i NetBackup -server smtp.moc.com -q -attach %4 ) blat %TEMP%\nbmail.tmp -s %SUBJECT% -t %1 -server smtp.moc.com >> D:\BUR_Scripts\Reports\DR File Email\nbmaillog.txt ) ELSE ( blat %TEMP%\nbmail.tmp -s %SUBJECT% -t %1 -server smtp.moc.com >> D:\BUR_Scripts\Reports\DR File Email\nbmaillog.txt -attach %4 )