REM Cache Clear Script REM Get Ahead 2011 REM www.getaheadweb.co.uk REM REM This script is provided without warranty REM It is free to use, alter and replicate REM REM If you have comments or suggestions please REM contact us via http://www.getaheadweb.co.uk @echo off cls echo Cache Clear - Get Ahead 2011 echo. echo Close any open browser windows pause :chrometest tasklist /FI "IMAGENAME eq chrome.exe" 2>NUL | find /I /N "chrome.exe">NUL if %ERRORLEVEL%==1 goto xptest cls echo Cache Clear - Get Ahead 2011 echo. echo Google Chrome is still running - If you have closed it, check the system try to if it is running in the background pause goto chrometest :xptest ver | find "XP" > nul if %ERRORLEVEL% == 0 goto winxp goto main :winxp set %LOCALAPPDATA%=%USERPROFILE%\LOCALS~1\APPLIC~1 :main set ChromeDir=%LOCALAPPDATA%\Google\Chrome\USERDA~1\Default del /q /s /f "%ChromeDir%\Cache\*.*" del /q /s /f "%ChromeDir%"\Curren~1 del /q /s /f "%ChromeDir%"\Curren~2 del /q /s /f "%ChromeDir%"\LastSe~1 del /q /s /f "%ChromeDir%"\LastTa~1 REM - FireFox set DataDir=%LOCALAPPDATA%\Mozilla\Firefox\Profiles\*\Cache\*.* del /q /s /f "%DataDir%" for /d %%x in (%APPDATA%\Mozilla\Firefox\Profiles\*) do del /q /s /f %%x\*sqlite REM - Safari set DataDir=%LOCALAPPDATA%\Applec~1\Safari del /q /s /f "%DataDir%\Cache.db" REM - IE RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 8 REM - Flash set FlashCookies=%APPDATA%\Macromedia\Flashp~1 del /q /s /f "%FlashCookies%" rd /s /q "%FlashCookies%" cls echo Cache Clear - Get Ahead 2011 echo. echo Your caches have been cleared. You may re-open your browser. pause