cancel
Showing results for 
Search instead for 
Did you mean: 

EZ Points for Scripters

Lance_Hoskins
Level 6
Ready, Set, GO!

Situation: I'm using NBU6.0 MP3 running on a W2K3 SP1 master and media servers. I have never used the notify scripts, but would like to play around with them. I'm trying to modify the backup_exit_notify script so that it will tell me when any of my Exchange backups get a status that's not 0 or 150.

Problems:
1) How's this code look to all of you windows batch scriptors out there?

@if %2 EQU "PolicyName" && %5 GTR 0 && %5 NEQ 150 goto :ExchangeFailed
:ExchangeFailed
@blat -body "Exchange Backup Failure" -subject "The Exchange Backup for %1 failed." -t me@work.com -f NetBackup@work.com -server mail.work.com

2) How come when I modify this cmd file from within Notepad it takes away the formatting of the file, causing it to fail the next time it's called (specifically takes away the character returns so that everything in the file is one long string.

HELP!

Lance
21 REPLIES 21

Stumpr2
Level 6
Lance and James,
Nice to see such revelry.
Looks like a case of Blat(z).
And now comes Miller time?

Lance_Hoskins
Level 6
I'm from the north woods (Minnesota). Lets share a Labatt's and call it good!