Bat file to clear cache only on IE CHROME & FIREFOX on windows 10

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
nix
Posts: 1
Joined: 09 Jun 2017 13:23

Bat file to clear cache only on IE CHROME & FIREFOX on windows 10

#1 Post by nix » 09 Jun 2017 23:42

Good Morning,

Would anyone be able to help me on the above using a simple bat file I have tried the below with no success?

::Internet Explorer
@echo off
REM Cookies:
REM RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 2
REM RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 8
::Firefox
@echo off
taskkill /im "firefox.exe"
set DataDir=C:\Users\%USERNAME%\AppData\Local\Mozilla\Firefox\Profiles
del /q /s /f "%DataDir%"
rd /s /q "%DataDir%"
for /d %%x in (C:\Users\%USERNAME%\AppData\Roaming\Mozilla\Firefox\Profiles\*) do del /q /s /f %%x\*sqlite
::Google Chrome
@echo off
set ChromeDir=C:\Users\%USERNAME%\AppData\Local\Google\Chrome\User Data
del /q /s /f "%ChromeDir%"
rd /s /q "%ChromeDir%"

Msg * "Cookies have been cleared"

Post Reply