@echo off
setlocal ENABLEDELAYEDEXPANSION

echo Cleaning up shader cache, D3DSCache, and NVIDIA DXCache folders...


REM Initialize counters
set /a "helldiversCount=0"
set /a "d3dCacheCount=0"
set /a "nvidiaCacheCount=0"

REM Count and delete files in Helldivers2 shader cache
for /f %%a in ('dir "%APPDATA%\Arrowhead\Helldivers2\shader_cache\*" /a:-d /b /s 2^>nul ^| find /c /v ""') do set helldiversCount=%%a
if %helldiversCount% gtr 0 (
    del /s /q "%APPDATA%\Arrowhead\Helldivers2\shader_cache\*"
    echo Deleted %helldiversCount% files from Helldivers2 shader cache.
) else (
    echo No files found in Helldivers2 shader cache.
)

REM Count and delete files in D3DSCache
for /f %%a in ('dir "%LOCALAPPDATA%\D3DSCache\*" /a:-d /b /s 2^>nul ^| find /c /v ""') do set d3dCacheCount=%%a
if %d3dCacheCount% gtr 0 (
    del /s /q "%LOCALAPPDATA%\D3DSCache\*"
    echo Deleted %d3dCacheCount% files from D3DSCache.
) else (
    echo No files found in D3DSCache.
)

REM Count and delete files in NVIDIA DXCache
for /f %%a in ('dir "%LOCALAPPDATA%\..\LocalLow\NVIDIA\PerDriverVersion\DXCache\*" /a:-d /b /s 2^>nul ^| find /c /v ""') do set nvidiaCacheCount=%%a
if %nvidiaCacheCount% gtr 0 (
    del /s /q "%LOCALAPPDATA%\..\LocalLow\NVIDIA\PerDriverVersion\DXCache\*"
    echo Deleted %nvidiaCacheCount% files from NVIDIA DXCache.
) else (
    echo No files found in NVIDIA DXCache.
)

echo Cleanup complete.
echo Summary:
echo Helldivers2 shader cache: %helldiversCount% files deleted.
echo D3DSCache: %d3dCacheCount% files deleted.
echo NVIDIA DXCache: %nvidiaCacheCount% files deleted.
pause

이대로 복사하고 txt를 bat로 변경
헬다2 캐시랑 그래픽카드 캐시까지 지워줌