-
Notifications
You must be signed in to change notification settings - Fork 0
/
CacheCleaner.bat
75 lines (69 loc) · 2.17 KB
/
CacheCleaner.bat
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
@echo off
cls
echo ^<-------------------------^>
echo ^< FiveM Cache Cleaner ^>
echo ^<-------------------------^>
echo.
echo This script will delete the cache for either Discord or FiveM.
echo.
echo It will force close the processes "FiveM.exe", "GTAVLauncher.exe", or "Discord.exe" if they are running.
echo.
:menu
echo Select an option:
echo 1) Discord cache
echo 2) FiveM cache
echo 3) Both Discord and FiveM cache
echo.
choice /c 123 /m "Enter your selection (1, 2, or 3):"
if errorlevel 3 goto both
if errorlevel 2 goto fivem
if errorlevel 1 goto discord
:both
explorer "%APPDATA%\Discord"
rmdir /s /q "%APPDATA%\Discord\1.0.9008"
taskkill /f /im Discord.exe
taskkill /f /im FiveM.exe
taskkill /f /im GTAVLauncher.exe
rmdir /s /q "%LocalAppData%\FiveM\FiveM.app\data\cache"
rmdir /s /q "%LocalAppData%\FiveM\FiveM.app\data\server-cache"
rmdir /s /q "%LocalAppData%\FiveM\FiveM.app\data\server-cache-priv"
rmdir /s /q "%LocalAppData%\FiveM\FiveM.app\logs"
rmdir /s /q "%LocalAppData%\FiveM\FiveM.app\crashes"
cls
echo.
echo Delete the folder "1.0.9010" The number may be different depending on your version.
echo If you do not see the folder then it was deleted automaticly.
echo.
choice /c YN /m "Is the Folder Deleted (Y/N)?"
if errorlevel 2 goto menu
if errorlevel 1 goto showend
:discord
explorer "%APPDATA%\Discord"
rmdir /s /q "%APPDATA%\Discord\1.0.9010"
taskkill /f /im Discord.exe
cls
echo.
echo Delete the folder "1.0.9010" The number may be different depending on your version.
echo If you do not see the folder then it was deleted automaticly.
echo.
choice /c YN /m "Is the Folder Deleted (Y/N)?"
if errorlevel 2 goto menu
if errorlevel 1 goto showend
REM Insert code for deleting Discord cache here
:showend
cls
echo.
echo You may now close this window and connect to the server.
pause
goto end
:fivem
cls
echo Deleting FiveM cache...
taskkill /f /im FiveM.exe
taskkill /f /im GTAVLauncher.exe
rmdir /s /q "%LocalAppData%\FiveM\FiveM.app\data\cache"
rmdir /s /q "%LocalAppData%\FiveM\FiveM.app\data\server-cache"
rmdir /s /q "%LocalAppData%\FiveM\FiveM.app\data\server-cache-priv"
rmdir /s /q "%LocalAppData%\FiveM\FiveM.app\logs"
rmdir /s /q "%LocalAppData%\FiveM\FiveM.app\crashes"
goto showend