Hi,
I run Networker 7.1.2 for Windows on a Windows 2000 Server box.
I use this batch file:
-------------------------------------------------
@echo off
rem **************************************************************
rem *** ***
rem *** PRINTLOGS.BAT ***
rem *** ------------- ***
rem *** This command file prints two copies of the backup log. ***
rem *** ***
rem **************************************************************
rem Author: John Trembly - March 12, 2004
rem
rem Modifications
rem -------------
rem April 22, 2004 - JT
rem Changed from the print formatting utility I was using to IMPRINT which allows me to
rem print in landscape among other new features. (Yay !!!)
rem
rem ********************************************************************************************
rem ********************************************************************************************
rem ** Original Print Command **
rem ** ---------------------- **
rem ** This prints one copy of the bootstrap log then deletes it from the Networker database. **
rem ** >nsrlpr -P "Infotech 9000"< (not good !!!) **
rem ** New command ----> "printlogs.bat" **
rem ********************************************************************************************
rem ********************************************************************************************
rem
rem
c:
cd \temp\log
rem **************************************************
rem *** Initialize environment veariable interface ***
rem **************************************************
set CURRDATE=%TEMP%\CURRDATE.TMP
set CURRTIME=%TEMP%\CURRTIME.TMP
set S=%TEMP%\S.TMP
rem *************************************
rem *** Load the DATE and TIME files. ***
rem *************************************
DATE /T > %CURRDATE%
ECHO | MORE | TIME | FIND "current" > %CURRTIME%
rem *****************************
rem *** Parse the date string.***
rem *****************************
set PARSEARG="eol=; tokens=1,2,3,4* delims=/, "
for /F %PARSEARG% %%i in (%CURRDATE%) Do set YYYYMMDD=%%l%%k%%j
rem ******************************
rem *** Parse the time string. ***
rem ******************************
for /F "tokens=1,2,3,4,5" %%i in (%CURRTIME%) Do set T=%%m
echo %T% > %CURRTIME%
set PARSEARG="eol=; tokens=1,2,3* delims=:, "
for /F %PARSEARG% %%i in (%CURRTIME%) Do set HHMM=%%i%%j
echo %T% > %CURRTIME%
for /F %PARSEARG% %%i in (%CURRTIME%) Do set S=%%k
echo %S% > %CURRTIME%
set PARSEARG="eol=; tokens=1,2* delims=., "
for /F %PARSEARG% %%i in (%CURRTIME%) Do set SS=%%j
rem ********************************************************************************************
rem ********************************************************************************************
rem ** This sends the section of the daemon log which pertains to the most recent backup **
rem ** to a text file so that multiple copies can be printed. **
rem ** **
rem ********************************************************************************************
rem ********************************************************************************************
nsrlog -f "backup.log"
rem ******************************************************************
rem *** Add the current date and time to the name of the log file. ***
rem ******************************************************************
rename backup.log backup_%YYYYMMDD%_%HHMM%%SS%.log
rem ******************************************************************************************
rem *** This formats and prints the log file. ***
rem *** (One for Operations and one for the service desk...) ***
rem *** ***
rem *** This printing method utilizes the IMPRINT utility from Gallicrow Software, Limited ***
rem *** and is a much better solution as the output is clearer to read and is printed in ***
rem *** landscape to allow for longer lines of uninterupted text. ($30US for one license) ***
rem ******************************************************************************************
imprint -batch backup_%YYYYMMDD%_%HHMM%%SS%.log -setupA -pr="infotech 9000"
imprint -batch backup_%YYYYMMDD%_%HHMM%%SS%.log -setupA -pr="helpdesk"
John Trembly
mailto:John.Trembly@dpcdsb.org