Need to cleanup some space on your C drive of your PC. If so checkout this useful Batch file.
Just copy the lines below and put them in a file that ends with bat using your favorite text editor and you are set to go.
This Batch file cleans Chrome’s Caxhe, Firefox’s Cache , and Edge’s Cache. It also runs Disk Cleanup. I put a pause between each cleanup to allow you to abort the cleanup before it starts the next cleanup.
Echo This Batch file cleans Chrome’s Cache, Firefox’s Cache, and Edge’s Cache. It also runs Disk Cleanup.
ECHO ————————————–
ECHO **** Clearing Chrome cache.
taskkill /F /IM “chrome.exe”>nul 2>&1
set ChromeDataDir=C:\Users\%USERNAME%\AppData\Local\Google\Chrome\User Data\Default
set ChromeCache=%ChromeDataDir%\Cache>nul 2>&1
del /q /s /f “%ChromeCache%*.“>nul 2>&1 del /q /f “%ChromeDataDir%*Cookies.“>nul 2>&1 del /q /f “%ChromeDataDir%*History.“>nul 2>&1 set ChromeDataDir=C:\Users\%USERNAME%\Local Settings\Application Data\Google\Chrome\User Data\Default set ChromeCache=%ChromeDataDir%\Cache>nul 2>&1 del /q /s /f “%ChromeCache%*.“>nul 2>&1
del /q /f “%ChromeDataDir%*Cookies.“>nul 2>&1
del /q /f “%ChromeDataDir%*History.“>nul 2>&1
ECHO **** Clearing Chrome cache DONE
pause
echo off
taskkill /F /IM “firefox.exe”
erase “%LOCALAPPDATA%\Mozilla\Firefox\Profiles*.*” /f /s /q
for /D %%i in (“%LOCALAPPDATA%\Mozilla\Firefox\Profiles*”) do RD /S /Q “%%i”
pause
Echo Edge Clean Cache
taskkill /F /IM “MSEdge.exe”
Echo Delete Temp Files
Taskkill /f /im Explorer.exe
Start Explorer.exe
cd %temp%
del /F /S /Q *.*
Echo Disk Cleanup
Echo This brings up Disk Cleanup and allows you to decide what to delete.
pause
cleanmgr /D c:
pause
echo End of file.
I hope you find it useful.