Re: ntbackup Alerts
"eWINg" <ewinglai@gmail.com> wrote in message
news:278c03a9-3283-4b00-a787-3501b447bb33@m3g2000hsc.googlegroups.com...
On Oct 2, 9:52 pm, "Pegasus \(MVP\)" <I....@fly.com.oz> wrote:
> "eWINg" <ewing...@gmail.com> wrote in message
>
> news:9f6c66b1-bd4a-4d54-a2c0-5d5c15b9ea59@k13g2000hse.googlegroups.com...
> On Sep 30, 11:46 pm, "Pegasus \(MVP\)" <I....@fly.com.oz> wrote:
>
>
>
>
>
> > "eWINg" <ewing...@gmail.com> wrote in message
>
> >news:c06bb153-be12-4dae-a1d7-f1504cde481f@e53g2000hsa.googlegroups.com...
> > On Sep 30, 4:31 pm, Masterplan <winmasterp...@gmail.com.> wrote:
>
> > > Hi,
>
> > > You can use schtasks command to monitor the scheduled tasks. You
> > > interogate
> > > the tasks like this:
> > > schtasks /query /v /fo:list | findstr /i "Taskname Result"
> > > And then send the result by email with a program like blat for
> > > example.
>
> > > --
> > > Have a nice day!
>
> > >http://winmasterplan.blogspot.com
>
> > > "eWINg" wrote:
> > > > Hello all,
>
> > > > I am running ntbackup on Windows 2003 Enterprise Edition
>
> > > > Would anyone tell me if is there is any way I can configure(bat/
> > > > vbscript) whereby ntbackup will alert me by email when the backup
> > > > job
> > > > has completed sucessfully or failed?
>
> > > > Regards and Thanks,- Hide quoted text -
>
> > > - Show quoted text -
>
> > I can use blat to email the log file, like
> > c:\windows\system32\blat.exe "%lastfile%" -t "1...@ddd.com" -s "Backup
> > Report" -mime -server "smtp.server" -f "s...@senderaddress.com" -q
>
> > But how can I select the latest log file attach to mail?
>
> > ==============
>
> > Which log file are you talking about - the one created by the scheduled
> > task
> > or the one created by ntbackup.exe?- Hide quoted text -
>
> > - Show quoted text -
>
> OH, I mean the log create by ntbackup, which place in
> C:\Documents and Settings\Administrator\Local Settings\Application Data
> \Microsoft\Windows NT\NTBackup\data
>
> how can I select the latest log file attach to mail?
> ================
> You can pick the most recent file with this batch file:
> @echo off
> set folder=d:\temp files
> for /F "delims=" %%a in ('dir /od /b "%folder%\*.log"') do set
> MostRecent=%%a
> echo %MostRecent% is the most recent file.- Hide quoted text -
>
> - Show quoted text -
Thanks for your help!
I wrote a window bat as follow, but it run with error, please HELP!
Run bat under:
C:\Documents and Settings\Administrator\Local Settings\Application Data
\Microsoft\Windows NT\NTBackup\data
Error:
The system cannot find the path specified.
"%a " is the most recent file.
@echo off
set folder="C:\Documents and Settings\Administrator\Local Settings
\Application Data\Microsoft\Windows NT\NTBackup\data"
for /F "delims=" %%a in ('dir /od /b "%folder%\*.log"') do set
set MostRecent=%%a
echo "%MostRecent%" is the most recent file.
Rem Mail latest log file to us
c:\windows\system32\blat.exe "%MostRecent%" -t "my@mail.com" -s
"Backup Report" -mime -server "smtp.server" -f
"some@senderaddress.com" -q
You added a set of double quotes to Line #2 which I did not have. You also
broke up the line below it and added an extra "set" word. Here is my batch
file again, this time line-numbered:
Line1: @echo off
Line2: set folder=d:\temp files
Line3: for /F "delims=" %%a in ('dir /od /b "%folder%\*.log"') do set
MostRecent=%%a
Line4: echo %MostRecent% is the most recent file.