Backup Windows Print Server Drivers/Printer/Ports
rem the server you want to backupset thisserver=%COMPUTERNAME%
rem the server you want to put the backup files on
set rmtserver=SERVERNAME
rem set the location and change scheduled to manual for manual backups
set rmtdir=d$\printerbackup\scheduled
echo The destination for the backup is \\%rmtserver%\rmtdir%
rem creates the destination if it does not exist
if not exist \\%rmtserver%\%rmtdir% mkdir \\%rmtserver%\%rmtdir%
rem rename older files
del \\%rmtserver%\%rmtdir%\%thisserver%_printers.printerExport.5
ren \\%rmtserver%\%rmtdir%\%thisserver%_printers.printerExport.4 %thisserver%_printers.printerExport.5
ren \\%rmtserver%\%rmtdir%\%thisserver%_printers.printerExport.3 %thisserver%_printers.printerExport.4
ren \\%rmtserver%\%rmtdir%\%thisserver%_printers.printerExport.2 %thisserver%_printers.printerExport.3
ren \\%rmtserver%\%rmtdir%\%thisserver%_printers.printerExport.1 %thisserver%_printers.printerExport.2
ren \\%rmtserver%\%rmtdir%\%thisserver%_printers.printerExport %thisserver%_printers.printerExport.1
%WINDIR%\System32\Spool\Tools\printbrm -B -O FORCE -F \\%rmtserver%\%rmtdir%\%thisserver%_printers.printerExport