@echo off

echo.
echo    RTC Factory Cleaner
echo    --------------------------------------------------
echo    This will delete all RTC save data, 
echo    PCSX2 config, emulator SaveStates and temp data
echo.
echo    To abort this procedure, Close the window.
echo.
echo.
echo.
echo.
Pause

rem !!!!!!!!!!!!!!!!!!!!!!!!!!!
rem DO NOT EDIT THIS BATCHFILE
rem !!!!!!!!!!!!!!!!!!!!!!!!!!!

cls
taskkill /F /IM "pcsx2.exe" > nul 2>&1
taskkill /F /IM "StandaloneRTC.exe" > nul 2>&1

del "EMU_LOG.txt" /F
rmdir /q /s cheats
rmdir /q /s cheats_ws
rmdir /q /s inis
rmdir /q /s logs
rmdir /q /s memcards
rmdir /q /s snaps
rmdir /q /s sstates


del "..\RTCV\RTC\MEMORYDUMPS\*.*" /F /Q
del "..\RTCV\RTC\RENDEROUTPUT\*.*" /F /Q
del "..\RTCV\RTC\WORKING\*.*" /F /Q /S
del "..\RTCV\RTC\PARAMS\*.*" /F /Q
del "..\RTCV\RTC\ENGINETEMPLATES\*.*" /F /Q
del "..\RTCV\debug\*.*" /F /Q

del "..\RTCV\RTC\EMU_LOG.txt" /F /Q
del "..\RTCV\RTC\RTC_LOG.txt" /F /Q


echo.
echo.
echo.
echo    Cleanup Completed
echo    --------------------------------------------------
echo    Any errors shown above might be normal
echo    and are kept on display for debugging purposes.
echo.
echo.
pause