cleanproblem.bat
Generated on Tue Dec 05 17:44:03 Eastern Standard Time 2006 from cleanproblem.bat
@echo off
goto begin
Program : CLEANPROBLEM.BAT
Purpose : Move GroupWise agent PROBLEM files from specified AGENTPATH to PROBLEMPATH
Date : 6 July 2005
Author : Bob Jonkman [bjonkman@sobac.com]
Modified: 24 October 2005 - Added moves for rebuilt DBs (*.DBA, *.DBB &c.)
Note : This file is intended to be CALLed from AGENT-SIZES.BAT
: STDERR utility available from http://www.teaser.fr/~amajorel/stderr/
Variables : PROBLEMPATH - Root destination for problem files
AGENT - Name of agent containing problem files
AGENTPATH - Root folder for AGENT
AGENTTYPE - Flag to identify POAs, which also have a PROBLEM queue
:begin
if "%PROBLEMPATH%"=="" goto end
if "%AGENT%"=="" goto end
if "%AGENTPATH%"=="" goto end
if not exist %PROBLEMPATH% md %PROBLEMPATH%
echo Agent= %AGENT% >> %PROBLEMPATH%\errors.txt
if not exist %PROBLEMPATH%\%AGENT% md %PROBLEMPATH%\%AGENT%
if not exist %PROBLEMPATH%\%AGENT%\WPCSOUT md %PROBLEMPATH%\%AGENT%\WPCSOUT
if exist %AGENTPATH%\WPCSOUT\PROBLEM\*.* move %AGENTPATH%\WPCSOUT\PROBLEM\*.* %PROBLEMPATH%\%AGENT%\WPCSOUT\ >> %PROBLEMPATH%\errors.txt
if not "%AGENTTYPE%" == "POA" goto agentgate
if not exist %PROBLEMPATH%\%AGENT%\WPCSIN md %PROBLEMPATH%\%AGENT%\WPCSIN
if exist %AGENTPATH%\WPCSIN\PROBLEM\*.* move %AGENTPATH%\WPCSIN\PROBLEM\*.* %PROBLEMPATH%\%AGENT%\WPCSIN\ >> %PROBLEMPATH%\errors.txt
if not exist %PROBLEMPATH%\%AGENT%\OFMSG md %PROBLEMPATH%\%AGENT%\OFMSG >> %PROBLEMPATH%\errors.txt
for %%i in (%AGENTPATH%\OFMSG\MSG*.$ER) do move %%i %PROBLEMPATH%\%AGENT%\OFMSG\ >> %PROBLEMPATH%\errors.txt
for %%i in (%AGENTPATH%\OFMSG\MSG*.DBA) do move %%i %PROBLEMPATH%\%AGENT%\OFMSG\ >> %PROBLEMPATH%\errors.txt
for %%i in (%AGENTPATH%\OFMSG\MSG*.DBB) do move %%i %PROBLEMPATH%\%AGENT%\OFMSG\ >> %PROBLEMPATH%\errors.txt
for %%i in (%AGENTPATH%\OFMSG\MSG*.DBC) do move %%i %PROBLEMPATH%\%AGENT%\OFMSG\ >> %PROBLEMPATH%\errors.txt
for %%i in (%AGENTPATH%\OFMSG\MSG*.DBD) do move %%i %PROBLEMPATH%\%AGENT%\OFMSG\ >> %PROBLEMPATH%\errors.txt
for %%i in (%AGENTPATH%\OFMSG\MSG*.DBE) do move %%i %PROBLEMPATH%\%AGENT%\OFMSG\ >> %PROBLEMPATH%\errors.txt
for %%i in (%AGENTPATH%\OFMSG\MSG*.DBF) do move %%i %PROBLEMPATH%\%AGENT%\OFMSG\ >> %PROBLEMPATH%\errors.txt
for %%i in (%AGENTPATH%\OFMSG\MSG*.DBG) do move %%i %PROBLEMPATH%\%AGENT%\OFMSG\ >> %PROBLEMPATH%\errors.txt
for %%i in (%AGENTPATH%\OFMSG\MSG*.DBH) do move %%i %PROBLEMPATH%\%AGENT%\OFMSG\ >> %PROBLEMPATH%\errors.txt
for %%i in (%AGENTPATH%\OFMSG\MSG*.DBI) do move %%i %PROBLEMPATH%\%AGENT%\OFMSG\ >> %PROBLEMPATH%\errors.txt
for %%i in (%AGENTPATH%\OFMSG\MSG*.DBJ) do move %%i %PROBLEMPATH%\%AGENT%\OFMSG\ >> %PROBLEMPATH%\errors.txt
for %%i in (%AGENTPATH%\OFMSG\MSG*.DBK) do move %%i %PROBLEMPATH%\%AGENT%\OFMSG\ >> %PROBLEMPATH%\errors.txt
for %%i in (%AGENTPATH%\OFMSG\MSG*.DBL) do move %%i %PROBLEMPATH%\%AGENT%\OFMSG\ >> %PROBLEMPATH%\errors.txt
for %%i in (%AGENTPATH%\OFMSG\MSG*.DBM) do move %%i %PROBLEMPATH%\%AGENT%\OFMSG\ >> %PROBLEMPATH%\errors.txt
for %%i in (%AGENTPATH%\OFMSG\MSG*.DBN) do move %%i %PROBLEMPATH%\%AGENT%\OFMSG\ >> %PROBLEMPATH%\errors.txt
for %%i in (%AGENTPATH%\OFMSG\MSG*.DBO) do move %%i %PROBLEMPATH%\%AGENT%\OFMSG\ >> %PROBLEMPATH%\errors.txt
for %%i in (%AGENTPATH%\OFMSG\MSG*.DBP) do move %%i %PROBLEMPATH%\%AGENT%\OFMSG\ >> %PROBLEMPATH%\errors.txt
for %%i in (%AGENTPATH%\OFMSG\MSG*.DBQ) do move %%i %PROBLEMPATH%\%AGENT%\OFMSG\ >> %PROBLEMPATH%\errors.txt
for %%i in (%AGENTPATH%\OFMSG\MSG*.DBR) do move %%i %PROBLEMPATH%\%AGENT%\OFMSG\ >> %PROBLEMPATH%\errors.txt
for %%i in (%AGENTPATH%\OFMSG\MSG*.DBS) do move %%i %PROBLEMPATH%\%AGENT%\OFMSG\ >> %PROBLEMPATH%\errors.txt
for %%i in (%AGENTPATH%\OFMSG\MSG*.DBT) do move %%i %PROBLEMPATH%\%AGENT%\OFMSG\ >> %PROBLEMPATH%\errors.txt
for %%i in (%AGENTPATH%\OFMSG\MSG*.DBU) do move %%i %PROBLEMPATH%\%AGENT%\OFMSG\ >> %PROBLEMPATH%\errors.txt
for %%i in (%AGENTPATH%\OFMSG\MSG*.DBV) do move %%i %PROBLEMPATH%\%AGENT%\OFMSG\ >> %PROBLEMPATH%\errors.txt
for %%i in (%AGENTPATH%\OFMSG\MSG*.DBW) do move %%i %PROBLEMPATH%\%AGENT%\OFMSG\ >> %PROBLEMPATH%\errors.txt
for %%i in (%AGENTPATH%\OFMSG\MSG*.DBX) do move %%i %PROBLEMPATH%\%AGENT%\OFMSG\ >> %PROBLEMPATH%\errors.txt
for %%i in (%AGENTPATH%\OFMSG\MSG*.DBY) do move %%i %PROBLEMPATH%\%AGENT%\OFMSG\ >> %PROBLEMPATH%\errors.txt
for %%i in (%AGENTPATH%\OFMSG\MSG*.DBZ) do move %%i %PROBLEMPATH%\%AGENT%\OFMSG\ >> %PROBLEMPATH%\errors.txt
if not exist %PROBLEMPATH%\%AGENT%\OFUSER md %PROBLEMPATH%\%AGENT%\OFUSER >> %PROBLEMPATH%\errors.txt
for %%i in (%AGENTPATH%\OFUSER\USER*.$ER) do move %%i %PROBLEMPATH%\%AGENT%\OFUSER\ >> %PROBLEMPATH%\errors.txt
for %%i in (%AGENTPATH%\OFUSER\USER*.DBA) do move %%i %PROBLEMPATH%\%AGENT%\OFUSER\ >> %PROBLEMPATH%\errors.txt
for %%i in (%AGENTPATH%\OFUSER\USER*.DBB) do move %%i %PROBLEMPATH%\%AGENT%\OFUSER\ >> %PROBLEMPATH%\errors.txt
for %%i in (%AGENTPATH%\OFUSER\USER*.DBC) do move %%i %PROBLEMPATH%\%AGENT%\OFUSER\ >> %PROBLEMPATH%\errors.txt
for %%i in (%AGENTPATH%\OFUSER\USER*.DBD) do move %%i %PROBLEMPATH%\%AGENT%\OFUSER\ >> %PROBLEMPATH%\errors.txt
for %%i in (%AGENTPATH%\OFUSER\USER*.DBE) do move %%i %PROBLEMPATH%\%AGENT%\OFUSER\ >> %PROBLEMPATH%\errors.txt
for %%i in (%AGENTPATH%\OFUSER\USER*.DBF) do move %%i %PROBLEMPATH%\%AGENT%\OFUSER\ >> %PROBLEMPATH%\errors.txt
for %%i in (%AGENTPATH%\OFUSER\USER*.DBG) do move %%i %PROBLEMPATH%\%AGENT%\OFUSER\ >> %PROBLEMPATH%\errors.txt
for %%i in (%AGENTPATH%\OFUSER\USER*.DBH) do move %%i %PROBLEMPATH%\%AGENT%\OFUSER\ >> %PROBLEMPATH%\errors.txt
for %%i in (%AGENTPATH%\OFUSER\USER*.DBI) do move %%i %PROBLEMPATH%\%AGENT%\OFUSER\ >> %PROBLEMPATH%\errors.txt
for %%i in (%AGENTPATH%\OFUSER\USER*.DBJ) do move %%i %PROBLEMPATH%\%AGENT%\OFUSER\ >> %PROBLEMPATH%\errors.txt
for %%i in (%AGENTPATH%\OFUSER\USER*.DBK) do move %%i %PROBLEMPATH%\%AGENT%\OFUSER\ >> %PROBLEMPATH%\errors.txt
for %%i in (%AGENTPATH%\OFUSER\USER*.DBL) do move %%i %PROBLEMPATH%\%AGENT%\OFUSER\ >> %PROBLEMPATH%\errors.txt
for %%i in (%AGENTPATH%\OFUSER\USER*.DBM) do move %%i %PROBLEMPATH%\%AGENT%\OFUSER\ >> %PROBLEMPATH%\errors.txt
for %%i in (%AGENTPATH%\OFUSER\USER*.DBN) do move %%i %PROBLEMPATH%\%AGENT%\OFUSER\ >> %PROBLEMPATH%\errors.txt
for %%i in (%AGENTPATH%\OFUSER\USER*.DBO) do move %%i %PROBLEMPATH%\%AGENT%\OFUSER\ >> %PROBLEMPATH%\errors.txt
for %%i in (%AGENTPATH%\OFUSER\USER*.DBP) do move %%i %PROBLEMPATH%\%AGENT%\OFUSER\ >> %PROBLEMPATH%\errors.txt
for %%i in (%AGENTPATH%\OFUSER\USER*.DBQ) do move %%i %PROBLEMPATH%\%AGENT%\OFUSER\ >> %PROBLEMPATH%\errors.txt
for %%i in (%AGENTPATH%\OFUSER\USER*.DBR) do move %%i %PROBLEMPATH%\%AGENT%\OFUSER\ >> %PROBLEMPATH%\errors.txt
for %%i in (%AGENTPATH%\OFUSER\USER*.DBS) do move %%i %PROBLEMPATH%\%AGENT%\OFUSER\ >> %PROBLEMPATH%\errors.txt
for %%i in (%AGENTPATH%\OFUSER\USER*.DBT) do move %%i %PROBLEMPATH%\%AGENT%\OFUSER\ >> %PROBLEMPATH%\errors.txt
for %%i in (%AGENTPATH%\OFUSER\USER*.DBU) do move %%i %PROBLEMPATH%\%AGENT%\OFUSER\ >> %PROBLEMPATH%\errors.txt
for %%i in (%AGENTPATH%\OFUSER\USER*.DBV) do move %%i %PROBLEMPATH%\%AGENT%\OFUSER\ >> %PROBLEMPATH%\errors.txt
for %%i in (%AGENTPATH%\OFUSER\USER*.DBW) do move %%i %PROBLEMPATH%\%AGENT%\OFUSER\ >> %PROBLEMPATH%\errors.txt
for %%i in (%AGENTPATH%\OFUSER\USER*.DBX) do move %%i %PROBLEMPATH%\%AGENT%\OFUSER\ >> %PROBLEMPATH%\errors.txt
for %%i in (%AGENTPATH%\OFUSER\USER*.DBY) do move %%i %PROBLEMPATH%\%AGENT%\OFUSER\ >> %PROBLEMPATH%\errors.txt
for %%i in (%AGENTPATH%\OFUSER\USER*.DBZ) do move %%i %PROBLEMPATH%\%AGENT%\OFUSER\ >> %PROBLEMPATH%\errors.txt
goto end
:agentgate
if not "%AGENTTYPE%"=="GATE" goto end
rem Gateways also have a GWPROB folder
if not exist %PROBLEMPATH%\%AGENT%\GWPROB md %PROBLEMPATH%\%AGENT%\GWPROB
if exist %AGENTPATH%\GWPROB\*.* move %AGENTPATH%\GWPROB\*.* %PROBLEMPATH%\%AGENT%\GWPROB\ >> %PROBLEMPATH%\errors.txt
:end
rem EOF: CLEANPROBLEM.BAT
1 files processed.