-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathClear Shader Cache.cmd
More file actions
55 lines (47 loc) · 1.61 KB
/
Clear Shader Cache.cmd
File metadata and controls
55 lines (47 loc) · 1.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
@echo off
setlocal
set "dxCachePath=%LOCALAPPDATA%\NVIDIA\DXCache"
set "glCachePath=%LOCALAPPDATA%\NVIDIA\GLCache"
set "steamShaderCachePath=C:\Program Files (x86)\Steam\steamapps\shadercache"
set "iobitUnlockerPath=C:\Program Files (x86)\IObit\IObit Unlocker\IObitUnlocker.exe"
echo Would you like to clear NVIDIA and Steam Shader Cache? (Y/N)
set /p choice=
if /i "%choice%"=="Y" (
if exist "%dxCachePath%" (
echo Removing DirectX NVIDIA Shader Cache...
rd /s /q "%dxCachePath%"
echo DirectX NVIDIA Shader Cache removed.
) else (
echo The DirectX NVIDIA Shader Cache folder does not exist.
)
if exist "%glCachePath%" (
echo Removing OpenGL NVIDIA Shader Cache...
rd /s /q "%glCachePath%"
echo OpenGL NVIDIA Shader Cache removed.
) else (
echo The OpenGL NVIDIA Shader Cache folder does not exist.
)
if exist "%steamShaderCachePath%" (
echo Removing Steam Shader Cache...
rd /s /q "%steamShaderCachePath%"
echo Steam Shader Cache removed.
) else (
echo The Steam Shader Cache folder does not exist.
)
echo.
echo Trying to unlock remaining files...
"%iobitUnlockerPath%" /delete "%dxCachePath%" /s
"%iobitUnlockerPath%" /delete "%glCachePath%" /s
"%iobitUnlockerPath%" /delete "%steamShaderCachePath%" /s
echo.
echo Shader Caches cleared successfully, press any key to exit...
pause >nul
) else if /i "%choice%"=="N" (
echo Operation aborted, press any key to exit...
pause >nul
exit /b
) else (
echo Invalid choice. Please try again.
pause >nul
)
endlocal