Subscribe to Windows IT Pro
December 18, 2001 12:00 AM

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

Windows IT Pro
InstantDoc ID #75878
Rating: (0)

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"


Related Content:

ARTICLE TOOLS

Comments
    There are no comments to display. Be the first one!
You must log on before posting a comment.

Are you a new visitor? Register Here

advertisement

advertisement

Windows is a trademark of the Microsoft group of companies. Windows IT Pro is used by Penton Media Inc. under license from owner.