Skip to content

Instantly share code, notes, and snippets.

@jonaharagon
Last active August 29, 2015 14:20
Show Gist options
  • Save jonaharagon/ca8e4d214c35ad9d2cc9 to your computer and use it in GitHub Desktop.
Save jonaharagon/ca8e4d214c35ad9d2cc9 to your computer and use it in GitHub Desktop.
Simple batch file to clear the massive logs of UCS - Cleaner by lotus10190, modified by deysmacro.
@echo off
tasklist /FI "IMAGENAME eq ucs.exe" | findstr "ucs.exe" >nul
if %ERRORLEVEL% == 1 goto runcode1
goto runcode2
:runcode1
start /min ucs.exe ...
timeout /t 14400
taskkill /f /im ucs.exe
timeout /t 1
rmdir logs /s /q
timeout /t 1
mkdir logs
goto runcode1
:runcode2
timeout /t 14400
taskkill /f /im ucs.exe
timeout /t 1
rmdir logs /s /q
timeout /t 1
mkdir logs
goto runcode1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment