There are many reasons why you (or your players) would want to clear their FiveM cache from their computer.
Clearing the cache enables fresh files to be downloaded, including updates, scripts and mods. In this tutorial, we show you how you can delete all the folders inside the Cache folder, except Game.
Creating a Batch File
Open up notepad and paste in this code
@echo off cd C:\Users\%username%\AppData\Local\FiveM\FiveM.app\cache Del browser, db, priv, servers, subprocess, unconfirmed, crashometry, launcher_skip_mtl2 /q /s
Once you have done that, you can then go to File > Save As and give it a filename. You need to ensure you select ALL FILES from the filters in the Save Dialog.
Then give it a filename such as clearcache.bat
Clearing the Cache with your launcher
Once you have created the batch file (.bat) you can then configure a button within GLC V2 to execute this batch file, once clicked. To do that, simply insert a new button into your launcher, right-click on the button and select properties.
In the properties dialog, select Execute Game/App and then type in the filename of the batch file, for example…
Once you have a button configured and your launcher has been built, you need to ensure you copy the batch file you created and put it inside the same folder as your built launcher executable.
If you intend on shipping your launcher to other users, be sure that this batch file is included with your launcher.
It really is as simple as that to do with Game Launcher Creator V2.