JSI Tip 4569. How do I automatically print the backupxx.log of my scheduled backup?


If you use a command line backup, add:

Call PrtBkLog \\Server\Printer

immediately after the Ntbackup command.

PrtBkLog.bat contains:

@echo off
setlocal
if \{%1\}==\{\} @echo Syntax PrintDevice (\\Server\Printer)
set device=%1
set prt=N
for /f "Tokens=*" %%i in ('dir /o-d /b "%userprofile%\Local Settings\Application Data\Microsoft\Windows NT\NTBackup\data\backup*.log"') do call :print %%i
endlocal
goto :EOF
:print
if not "%prt%" EQU "N" goto :EOF
set prt=Y
print /D:%device% "%userprofile%\Local Settings\Application Data\Microsoft\Windows NT\NTBackup\data\%1"


Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish