CJSmith dot me

I dump stuff I find useful here

Maintain regtrans-ms and blf files generated by Georgia UTS sessions

Published / by Chris Smith / Leave a Comment

A little script I schedule for servers using Georgia UTS.
Below I use Robocopy to move files older than 3 days, to avoid anyone currently logged in. For me I expect users to be logged on for no more than a day, active user files should therefore be untouched.

echo This Batch Files removes .regtrans-ms and .TM.blf which can take up space if unmaintained
echo Change to C drive to ensure correct
%systemdrive%
cd \
echo Create temporary directory
mkdir deltempfiles
echo Copy temporary files into temp directory
ROBOCOPY C:\Users\ C:\deltempfiles\ *.regtrans-ms /move /minage:3 /S /R:1 /W:1 /XJ
ROBOCOPY C:\Users\ C:\deltempfiles\ *.TM.blf /move /minage:3 /S /R:1 /W:1 /XJ
echo Cleanup
rmdir C:\deltempfiles\ /S /Q
echo Complete
exit

Leave a Reply