How to keep the Cognos server clean

If you administer a Cognos server, you know that Cognos does not clean up after itself properly… :-X I know you can delete some directories (when Cognos service is stopped) like RTModels, Temp and some other files like dmp etc

CognosLord did post a article for old mdc files here as a starter:
http://www.cogknowhow.com/index.php/knowledge-articles/30-cognos-8/306-script-to-delete-old-transformer-mdc-files

But i am looking for a complete script which can do this scheduled/during reboot for me :slight_smile: And if it is not out there, i am intending to create one and publish it in the tutorial member section. http://www.cogknowhow.com/index.php/tutorials

So please provide me with some scripts or docs to make this happen!

thanks!

I saw this script once at a customer site for deleting files:

REM del_old.bat 
REM usage: del_old MM-DD-YYY 
C:
cd "\program files\cognos\c8\Temp"

for /f "tokens=*" %%a IN ('xcopy *.* /d:%1 /L /I null') do if exist %%~nxa echo %%~nxa >> FILES_TO_KEEP.TXT 
for /f "tokens=*" %%a IN ('xcopy *.* /L /I /EXCLUDE:FILES_TO_KEEP.TXT null') do if exist "%%~nxa" del "%%~nxa"

so every file in the specified directory was deleted older than the specified date.