0 of 0

File information

Last updated

Original upload

Created by

DatBoi302

Uploaded by

datboi302

Virus scan

Safe to use

Tags for this mod

About this mod

Simple .bat file for cleaning the Helldivers 2 and Nvidia shader cache. Now with AMD support!

Permissions and credits
Description:
.bat file for cleaning your Helldivers 2, Nvidia, and (hopefully) AMD shader cache. It is recommended to do this periodically or after any major game update. This is important for helping to improve your games performance due to updates overtime "clogging up" the games shader folder. Your first few minutes of gameplay might be worse after using this script, however, this is only due to new and fresh shaders being generated. Eventually you will end up with better performance than before.

How to use:
Simply double click the .bat file to run the script.
You can run the file from anywhere on your pc.
A command window will appear detailing the items cleaned. 

-------------------------------------------------------------------------------------------------------------
If you can't download the file yourself, you can make it yourself!
1. Create a Text file on your desktop
2. Paste the code below into the Text and save it
3. Rename the file to whatever you'd like and replace the ".txt" in the name with ".bat"
4. That's it, simply rum it to use it!

Code:
@echo off
setlocal ENABLEDELAYEDEXPANSION

echo Cleaning Helldivers2 Shader Cache, D3DSCache, NVIDIA DXCache, AMD DXCache, and AMD DXcCache folders...

REM Initialize counters
set /a "helldiversCount=0"
set /a "d3dCacheCount=0"
set /a "nvidiaCacheCount=0"
set /a "amdCacheCount=0"
set /a "amdcCacheCount=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.
)

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

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

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