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
echo Create temporary directory
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
rmdir C:\deltempfiles\ /S /Q