• Skip to primary navigation
  • Skip to main content
  • Skip to footer

JH Tech Services

A knowledgebase

  • Portfolio
  • Knowledgebase
  • About

Logon script to remove cache and temp once daily for DM 5.2.1

March 24, 2011 by jer0dh

We use this in a startup script contained in a Group Policy Object that is applied to all users. We have found it has helped decrease DM issues. Once a day it removes DM’s cache and temp directories. Since we can sometimes recover documents from these directories, it creates a backup of the directories. We limit this to only once a day in case the user is having to logon frequently due to crashing or something else.

REM set variable with today's date in format mmddyyyy
set tday=%date:~4,2%%date:~7,2%%date:~10,4%

If EXIST "%USERPROFILE%Application DataHummingbirdDMDMtest%tday%.txt" GOTO done
rmdir /s /q "%USERPROFILE%Application DataHummingbirdDMcache2"
rmdir /s /q "%USERPROFILE%Application DataHummingbirdDMDMtest"
rmdir /s /q "%USERPROFILE%Application DataHummingbirdDMtemp2"
rename "%USERPROFILE%Application DataHummingbirdDMcache" cache2
rename "%USERPROFILE%Application DataHummingbirdDMtemp" temp2
mkdir "%USERPROFILE%Application DataHummingbirdDMDMtest"
ECHO %tday% file > "%USERPROFILE%Application DataHummingbirdDMDMtest%tday%.txt"

:done

  • Knowledgebase
  • Uncategorized

Footer

  • Portfolio
  • Knowledgebase
  • About

© 2023